From 68ffe0347dcfe2c94e3dbac26d18046600c53952 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Cs=C3=A1rdi?= Date: Fri, 22 Mar 2024 16:01:28 +0100 Subject: [PATCH] Do not run tests on CRAN --- tests/testthat.R | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/testthat.R b/tests/testthat.R index 63961a8e..4facdde6 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") }