Skip to content

Commit

Permalink
ensure that tests run quickly on CRAN
Browse files Browse the repository at this point in the history
  • Loading branch information
dblodgett-usgs committed May 28, 2024
1 parent b74f91b commit 3d8010d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/testthat/test_geoconnex.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
test_that("discover", {

skip_on_cran()

expect_s3_class(discover_geoconnex_reference(), "data.frame")

expect_equal(names(discover_geoconnex_reference()),
Expand All @@ -8,6 +10,9 @@ test_that("discover", {
})

test_that("get", {

skip_on_cran()

expect_warning(avail <- get_geoconnex_reference())

expect_equal(avail, discover_geoconnex_reference())
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test_get_3dhp.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
test_that("get_3dhp", {

skip_on_cran()

expect_error(get_3dhp(universalreferenceid = "01234", type = "test"),
"only be specified for hydrolocation")

Expand Down
1 change: 1 addition & 0 deletions vignettes/get_3dhp_data.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ vignette: >
library(nhdplusTools)
local <- (Sys.getenv("BUILD_VIGNETTES") == "TRUE")
if(local) {
cache_path <- file.path(nhdplusTools_data_dir(), "3dhp_v_cache")
} else {
Expand Down
1 change: 1 addition & 0 deletions vignettes/get_data_overview.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ vignette: >
library(nhdplusTools)
local <- (Sys.getenv("BUILD_VIGNETTES") == "TRUE")
if(local) {
cache_path <- file.path(nhdplusTools_data_dir(), "data_v_cache")
} else {
Expand Down
1 change: 1 addition & 0 deletions vignettes/plot_nhdplus.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ vignette: >
library(nhdplusTools)
local <- (Sys.getenv("BUILD_VIGNETTES") == "TRUE")
if(local) {
cache_path <- file.path(nhdplusTools_data_dir(), "plot_v_cache")
} else {
Expand Down

0 comments on commit 3d8010d

Please sign in to comment.