Skip to content

Commit c3d86dc

Browse files
lower tolerance on tests of compare_writer_profiles
Two tests of `compare_writer_profiles()`pass on my computer but fail on GitHub because the values on GitHub are slightly different. The difference is less than 1e-3, which is acceptable.
1 parent 3dfa492 commit c3d86dc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/testthat/test-compare.R

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,11 @@ testthat::test_that("Compare writer profiles works when score_only is FALSE, wri
7070

7171
expected <- readRDS(testthat::test_path("fixtures", "compare", "cwp_score_only_FALSE_unknown_2df.rds"))
7272

73-
testthat::expect_identical(actual, expected)
73+
testthat::expect_equal(actual, expected, tolerance = 1e-3)
7474
})
7575

76-
testthat::test_that("Compare writer profiles works when score_only is FALSE, writers are unknown, and there is 1 input dataframe", {
76+
testthat::test_that("Compare writer profiles works when score_only is FALSE, writers are unknown, and there is 1 input dataframe, local version", {
77+
7778
writer_profiles <- test[1:4, ] %>% dplyr::select(-writer)
7879
writer_profiles2 <- test[5:8, ] %>% dplyr::select(-writer)
7980
actual <- compare_writer_profiles(
@@ -83,7 +84,7 @@ testthat::test_that("Compare writer profiles works when score_only is FALSE, wri
8384

8485
expected <- readRDS(testthat::test_path("fixtures", "compare", "cwp_score_only_FALSE_unknown.rds"))
8586

86-
testthat::expect_identical(actual, expected)
87+
testthat::expect_equal(actual, expected, tolerance = 1e-3)
8788
})
8889

8990
testthat::test_that("Compare writer profiles works when score_only is TRUE, writers are known, and there are 2 input dataframes", {

0 commit comments

Comments
 (0)