diff --git a/tests/testthat/test-build_nflfastR_pbp.R b/tests/testthat/test-build_nflfastR_pbp.R index 00786fc2..07bdc4e5 100644 --- a/tests/testthat/test-build_nflfastR_pbp.R +++ b/tests/testthat/test-build_nflfastR_pbp.R @@ -3,7 +3,10 @@ test_that("build_nflfastR_pbp works (on CRAN)", { # so it can't break because of failed downloads pbp <- load_test_pbp(dir = test_dir) expect_s3_class(pbp, "nflverse_data") - pbp <- strip_nflverse_attributes(pbp) + pbp <- strip_nflverse_attributes(pbp) %>% + # we gotta round floating point numbers because of different model output + # across platforms + round_double_to_digits() exp <- load_expectation("pbp") expect_equal(pbp, exp) }) @@ -14,7 +17,10 @@ test_that("build_nflfastR_pbp works (outside CRAN)", { skip_on_cran() skip_if_offline("github.com") pbp <- load_test_pbp(dir = NULL) - pbp <- strip_nflverse_attributes(pbp) + pbp <- strip_nflverse_attributes(pbp) %>% + # we gotta round floating point numbers because of different model output + # across platforms + round_double_to_digits() exp <- load_expectation("pbp") expect_equal(pbp, exp) })