Skip to content

Commit

Permalink
try to get cvrisk test passing in covr
Browse files Browse the repository at this point in the history
  • Loading branch information
hofnerb committed Aug 23, 2017
1 parent b6c6827 commit c5dbe55
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/testthat/test-cvrisk.R
Expand Up @@ -75,7 +75,7 @@ if (require("survival")) {
fit <- glmboost(fm, data = ovarian, family = CoxPH())

test_that("corrected crossvalidation works for CoxPH models", {
expect_warning(cvrisk(fit, corrected = TRUE), "All values in .grid. must be greater 0 if family = .CoxPH., hence 0 is dropped from grid")
expect_warning(cvrisk(fit, corrected = TRUE), "All values in .*grid.* must be greater 0 if family = .*CoxPH.*, hence 0 is dropped from grid")

expect_silent(cvr <- cvrisk(fit, grid = seq(1, 101, by = 2), corrected = TRUE))
expect_equal(dim(cvr), c(25, 51))
Expand All @@ -86,3 +86,5 @@ if (require("survival")) {
expect_gt(mstop(cvr_uncor), 0)
})
}


0 comments on commit c5dbe55

Please sign in to comment.