Check how CRAN is, but don't miss any tests
1 answer
The current version will testhat::skip_on_cran
just check the system variable:
testthat::skip_on_cran
function ()
{
if (identical(Sys.getenv("NOT_CRAN"), "true")) {
return(invisible(TRUE))
}
skip("On CRAN")
}
My site devtools::check
doesn't set this environment variable even with cran = TRUE
, so all tests run. That is, the question doesn't make sense in the current version testthat
.
0
source to share