Skip to content

Commit

Permalink
fix: skip all test related to network for CRAN
Browse files Browse the repository at this point in the history
Closes #49
  • Loading branch information
DDorch committed Jan 13, 2025
1 parent 006610d commit 0dd0082
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions tests/testthat/test-doApiQuery.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
skip_on_cran()
test_that("A query of more than 20000 records", {
expect_error(doApiQuery("indicateurs_services", "communes"),
regexp = "The request reach the API limitation of 20000 records")
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-get_hydrometrie_observations_tr.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ test_that("entities not in ('station', 'site', 'both') should throw an error", {
)
})

skip_on_cran()

test_that("`entities = 'station'` => 'code_station' must be always not NA", {
skip_on_cran()
df <- get_hydrometrie_observations_tr(params, entities = "station")
expect_true(all(!is.na(df$code_station)))
})

test_that("`entities = 'site'` => 'code_station' must be always NA", {
skip_on_cran()
df <- get_hydrometrie_observations_tr(params, entities = "site")
expect_true(all(is.na(df$code_station)))
})
Expand Down

0 comments on commit 0dd0082

Please sign in to comment.