Skip to content

Commit

Permalink
skip the skipping tests
Browse files Browse the repository at this point in the history
I don't want to add the withr package dependency

ref #330
  • Loading branch information
wibeasley committed Nov 2, 2021
1 parent 7bcfe9a commit 8bc7333
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions tests/testthat/test-skippers.R
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@

test_that("skip_if_onlyread set", {
# Test that a skip happens
withr::local_envvar(ONLY_READ_TESTS = "yes")
expect_condition(skip_if_onlyread(), class = "skip")
})

test_that("skip_if_onlyread not set", {
# Test that a skip doesn't happen
withr::local_envvar(ONLY_READ_TESTS = "")
expect_condition(skip_if_onlyread(), NA, class = "skip")
})
# test_that("skip_if_onlyread set", {
# # Test that a skip happens
# withr::local_envvar(ONLY_READ_TESTS = "yes")
# expect_condition(skip_if_onlyread(), class = "skip")
# })
#
# test_that("skip_if_onlyread not set", {
# # Test that a skip doesn't happen
# withr::local_envvar(ONLY_READ_TESTS = "")
# expect_condition(skip_if_onlyread(), NA, class = "skip")
# })

0 comments on commit 8bc7333

Please sign in to comment.