Skip to content

Commit

Permalink
Add tolerance to snapshot tests
Browse files Browse the repository at this point in the history
Required for tests on Solaris
  • Loading branch information
Bisaloo committed Mar 20, 2021
1 parent 29a9baa commit 0bbe1f7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/testthat/test_getspec.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
test_that("get_spec all", {

# Tolerance is required for tests on Solaris
expect_snapshot_value(
expect_message(
lr_get_spec(test.file(),
Expand All @@ -8,21 +9,23 @@ test_that("get_spec all", {
sep = ","),
"16 files"),
style = "serialize",
cran = TRUE
cran = TRUE,
tolerance = 1e-10
)

})

test_that("get_spec recursive", {

# Recursive
# Tolerance is required for tests on Solaris
expect_snapshot_value(
expect_message(
lr_get_spec(test.file(), ext = "ProcSpec", subdir = TRUE),
"5 files"
),
style = "serialize",
cran = TRUE
cran = TRUE,
tolerance = 1e-10
)

})
Expand Down

0 comments on commit 0bbe1f7

Please sign in to comment.