You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Facing a dilemma - pass CRAN tests with less coverage, or fail CRAN and get better coverage.
The problem comes from the interactive() flag. To avoid upsetting CRAN checks, we must "protect" (suppress) a number of tests by enclosing them in if (interactive()) {...}.
I suppose it is impossible to make interactive() TRUE by force.
Is there an alternative to replace it with some environment variable in order to allow those extra tests to run only inside covr::coveralls ?
The text was updated successfully, but these errors were encountered:
@olivroy, thank you for replying. Yes, one could set rlang::is_interactive() through rlang::local_interactive().
The problem is that devtools::test and covr::package_coverage will read the same flag and execute the same tests.
I think I found how to differentiate between the two - using flag Sys.getenv("R_COVR")!=''. This is an environment variable set for covr::package_coverage only. Now we can run more tests for coverage without raising warnings and errors in CRAN checks (devtools::test).
Facing a dilemma - pass CRAN tests with less coverage, or fail CRAN and get better coverage.
The problem comes from the interactive() flag. To avoid upsetting CRAN checks, we must "protect" (suppress) a number of tests by enclosing them in
if (interactive()) {...}
.I suppose it is impossible to make interactive() TRUE by force.
Is there an alternative to replace it with some environment variable in order to allow those extra tests to run only inside covr::coveralls ?
The text was updated successfully, but these errors were encountered: