Check how CRAN is, but don't miss any tests

Is there an easy way with devtools::check()

doing extended CRAN checks, but also running testhat tests marked as skip_on_cran()

?

Basically, I want to run the most comprehensive tests I can: all CRAN checks as well as all my unit tests

+3


source to share


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







All Articles