diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2019-07-04 08:10:33 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2019-07-04 08:10:33 +0200 |
commit | 7e8d788d298b8e1492fd8f62d88456e99e0f5992 (patch) | |
tree | 0ec78730e5d6cd5367420b2f04effbd1cc1b0f3f /tests/testthat/test_error_models.R | |
parent | d004cfb133b2b38808a736916152b85c5df6568f (diff) |
Address failures of CRAN checks, improve NEWSv0.9.49.5
Static documentation rebuilt by pkgdown
Diffstat (limited to 'tests/testthat/test_error_models.R')
-rw-r--r-- | tests/testthat/test_error_models.R | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/testthat/test_error_models.R b/tests/testthat/test_error_models.R index 33e44bf8..fbae6286 100644 --- a/tests/testthat/test_error_models.R +++ b/tests/testthat/test_error_models.R @@ -91,14 +91,17 @@ test_that("Reweighting method 'tc' produces reasonable variance estimates", { sdfunc = function(x) sigma_twocomp(x, 0.5, 0.07), n = 1, reps = 100, digits = 5, LOD = -Inf, seed = 123456) - # Per default (on my box) use all cores minus one - n_cores <- parallel::detectCores() - 1 + # Per default (on my box where I set NOT_CRAN) use all cores minus one + if (identical(Sys.getenv("NOT_CRAN"), "true")) { + n_cores <- parallel::detectCores() - 1 + } else { + n_cores <- 1 + } - # We are only allowed one core on travis + # We are only allowed one core on travis, but they also set NOT_CRAN=true if (Sys.getenv("TRAVIS") != "") n_cores = 1 - # Also on Windows we would need to make a cluster first, - # and I do not know how this would work on winbuilder or CRAN, so + # On Windows we would need to make a cluster first if (Sys.info()["sysname"] == "Windows") n_cores = 1 # Unweighted fits |