Skip to content

Commit

Permalink
Don't test parallel on covr
Browse files Browse the repository at this point in the history
  • Loading branch information
chjackson committed Aug 24, 2023
1 parent 9399e1b commit 5ba7ba6
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/testthat/test_boot.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,14 @@ test_that("bootstrap CIs with factor subject IDs and factor covariates",{
covariates=list(hieffusn=0, ollwsdrt="foo"))))
})

test_that("bootstrap CIs with parallel processing",{
if (!covr::in_covr()){
test_that("bootstrap CIs with parallel processing",{
skip_on_cran()
expect_error({
t.par <- system.time(pmatrix.msm(psor.msm, ci="boot", cores=4, B=8))
# t.ser <- system.time(pmatrix.msm(psor.msm, ci="boot", cores=1, B=8))
# expect_true(t.par["elapsed"] < t.ser["elapsed"]) # if B is bigger
# t.ser <- system.time(pmatrix.msm(psor.msm, ci="boot", cores=1, B=8))
# expect_true(t.par["elapsed"] < t.ser["elapsed"]) # if B is bigger
}, NA)
})
})
}

0 comments on commit 5ba7ba6

Please sign in to comment.