Skip to content

Commit

Permalink
make sure to skip all ghcnd tests on cran fix #382
Browse files Browse the repository at this point in the history
  • Loading branch information
sckott committed Jan 23, 2021
1 parent 4884461 commit 099dc36
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Description: Client for many 'NOAA' data sources including the 'NCDC' climate
for 'NOAA' sea ice data, the 'NOAA' severe weather inventory, 'NOAA' Historical
Observing 'Metadata' Repository ('HOMR') data, 'NOAA' storm data via 'IBTrACS',
tornado data via the 'NOAA' storm prediction center, and more.
Version: 1.3.0
Version: 1.3.1.91
License: MIT + file LICENSE
Encoding: UTF-8
Language: en-US
Expand Down
5 changes: 5 additions & 0 deletions tests/testthat/test-ghcnd.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
context("ghcnd")

test_that("states metadata", {
skip_on_cran()
vcr::use_cassette("ghcnd_states", {
states <- ghcnd_states()

Expand All @@ -13,6 +14,7 @@ test_that("states metadata", {
})

test_that("countries metadata", {
skip_on_cran()
vcr::use_cassette("ghcnd_countries", {
countries <- ghcnd_countries()

Expand All @@ -25,6 +27,7 @@ test_that("countries metadata", {
})

test_that("version metadata", {
skip_on_cran()
vcr::use_cassette("ghcnd_version", {
ver <- ghcnd_version()

Expand Down Expand Up @@ -126,6 +129,7 @@ test_that("ghncd accepts vector input", {
})

test_that("meteo_tidy_ghcnd accepts vector input", {
skip_on_cran()
stations <- c("ACW00011604", "ACW00011647", "AE000041196")
data <- meteo_tidy_ghcnd(stations)

Expand All @@ -137,6 +141,7 @@ test_that("meteo_tidy_ghcnd accepts vector input", {


test_that("alternative base urls", {
skip_on_cran()
expect_equal(Sys.getenv("RNOAA_GHCND_BASE_URL"), "")

Sys.setenv(RNOAA_GHCND_BASE_URL = "https://google.com")
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-ghcnd_splitvars.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ test_that("ghcnd_splitvars for data", {
})

test_that("ghcnd_splitvars fails well", {
skip_on_cran()

expect_error(ghcnd_splitvars("adfadfs"), "input must be a data.frame")
expect_error(ghcnd_splitvars(5), "input must be a data.frame")
expect_error(ghcnd_splitvars(list(4)), "input must be a data.frame")
Expand Down

0 comments on commit 099dc36

Please sign in to comment.