From 3129aac143c7eac4e7fbebd53d66836131c5d41d Mon Sep 17 00:00:00 2001 From: Sebastian Carl Date: Wed, 6 Dec 2023 16:22:40 +0100 Subject: [PATCH] Seems like CRAN started setting one of those env vars to `NA` closes #448 --- tests/testthat/setup.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testthat/setup.R b/tests/testthat/setup.R index 3f4fee72..3da41907 100644 --- a/tests/testthat/setup.R +++ b/tests/testthat/setup.R @@ -14,7 +14,7 @@ cpu_check <- as.numeric( ) ) -if (any(cpu_check != 0)) { +if (any(is.na(cpu_check)) || any(cpu_check[!is.na(cpu_check)] != 0)) { cores <- min( floor(as.integer(Sys.getenv("_R_CHECK_EXAMPLE_TIMING_CPU_TO_ELAPSED_THRESHOLD_"))), floor(as.integer(Sys.getenv("_R_CHECK_TEST_TIMING_CPU_TO_ELAPSED_THRESHOLD_"))),