diff --git a/tests/testthat.R b/tests/testthat.R index 63961a8..4facdde 100644 --- a/tests/testthat.R +++ b/tests/testthat.R @@ -1,12 +1,13 @@ - library(callr) -if (callr:::is_false_check_env_var("_R_CHECK_FORCE_SUGGESTS_")) { - if (requireNamespace("testthat", quietly = TRUE)) { +if (Sys.getenv("NOT_CRAN") == "true") { + if (callr:::is_false_check_env_var("_R_CHECK_FORCE_SUGGESTS_")) { + if (requireNamespace("testthat", quietly = TRUE)) { + library(testthat) + test_check("callr") + } + } else { library(testthat) test_check("callr") } -} else { - library(testthat) - test_check("callr") }