-
Notifications
You must be signed in to change notification settings - Fork 339
Description
Currently, the code inside snapshots runs on CRAN and then a skip is issued afterwards. Running the code instead of skipping right away is meant to exercise that code and check that it doesn't throw any errors.
Throwing a skip() causes the whole test_that() block to skip, which means:
-
Further tests in the
test_that()block are not run, so the CRAN coverage is reduced. -
Sometimes state is reset in the rest of the block, and then doesn't get cleaned up on CRAN only. This is easy to miss because CI and local
devtools::check()don't skip. And hard to debug because issues created by the unclean state will manifest in unrelated tests. Example: r-lib/withr@8641a4a.
Ideally, expect_snapshot() would return normally on CRAN before the snapshot comparison instead of skipping.