Skip to content

Commit

Permalink
different way of skipping long tests (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aariq committed Jan 29, 2025
1 parent 421c114 commit c285b35
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion tests/testthat/test-npn-geoserver.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
skip_long_tests <- as.logical(Sys.getenv("RNPN_SKIP_LONG_TESTS", unset = "true"))

test_that("npn_get_layer_details works", {
skip_on_cran()
skip_if_not(check_geo_service(), "Geo Service is down")
Expand Down Expand Up @@ -143,7 +145,7 @@ test_that("npn_get_agdd_point_data works",{

test_that("npn_get_custom_agdd_raster works", {
skip_on_cran()
skip_if(get_skip_long_tests())
skip_if(skip_long_tests)
# skip_if_not(check_data_service(), "Data Service is down")

res <- npn_get_custom_agdd_raster(
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-npn-observations.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# https://github.com/ropensci/vcr/issues/273 and
# https://github.com/r-lib/httr2/issues/651

skip_long_tests <- get_skip_long_tests()
skip_long_tests <- as.logical(Sys.getenv("RNPN_SKIP_LONG_TESTS", unset = "true"))

test_that("no request source blocked", {
skip_on_cran()
Expand Down

0 comments on commit c285b35

Please sign in to comment.