Skip to content

Commit

Permalink
skip tests because cran keeps rejecting due to multi-threadig
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcaseb committed Oct 13, 2023
1 parent 0cdaa95 commit a8bc6cf
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/testthat/test-build_nflfastR_pbp.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
test_that("build_nflfastR_pbp works (on CRAN)", {
# this test will run on everywhere, including CRAN. It uses locally available data
# so it can't break because of failed downloads
test_that("build_nflfastR_pbp works (local data)", {
# This test used to run on CRAN but their changes to env vars which cause
# check NOTES for multi-threading forced us to skip on cran. It uses locally
# available data so it can't break because of failed downloads
skip_on_cran()

pbp <- load_test_pbp(dir = test_dir)
expect_s3_class(pbp, "nflverse_data")
pbp <- strip_nflverse_attributes(pbp) %>%
Expand All @@ -15,6 +18,7 @@ test_that("build_nflfastR_pbp works (outside CRAN)", {
# this test is almost the same as above. However, it requires data download
# and will therefore not run on CRAN but everywhere else.
skip_on_cran()

skip_if_offline("github.com")
pbp <- load_test_pbp(dir = NULL)
pbp <- strip_nflverse_attributes(pbp) %>%
Expand Down
4 changes: 4 additions & 0 deletions tests/testthat/test-calculate_series_conversion_rates.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
test_that("calculate_series_conversion_rates works", {
# This test used to run on CRAN but their changes to env vars which cause
# check NOTES for multi-threading forced us to skip on cran.
skip_on_cran()

pbp <- load_test_pbp()

sc <- calculate_series_conversion_rates(pbp = pbp, weekly = FALSE) %>%
Expand Down
8 changes: 8 additions & 0 deletions tests/testthat/test-ep_wp_calculators.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
test_that("calculate_expected_points works", {
# This test used to run on CRAN but their changes to env vars which cause
# check NOTES for multi-threading forced us to skip on cran.
skip_on_cran()

data <- tibble::tibble(
"season" = 2018:2019,
"home_team" = "SEA",
Expand All @@ -17,6 +21,10 @@ test_that("calculate_expected_points works", {
})

test_that("calculate_expected_points works", {
# This test used to run on CRAN but their changes to env vars which cause
# check NOTES for multi-threading forced us to skip on cran.
skip_on_cran()

data <- tibble::tibble(
"receive_2h_ko" = 0,
"home_team" = "SEA",
Expand Down

0 comments on commit a8bc6cf

Please sign in to comment.