diff --git a/tests/testthat/test-check.R b/tests/testthat/test-check.R index 63928f61..4b598dd4 100644 --- a/tests/testthat/test-check.R +++ b/tests/testthat/test-check.R @@ -4,6 +4,13 @@ test_that( desc = 'errors trigger on cue', code = { + expect_error( + check_arg_uni(uni = c('a', 'b', 'd'), + arg_name = 'ok', + expected_uni = c('a', 'b', 'c')), + regexp = 'should contain' + ) + expect_error( check_arg_is_integer(arg_name = 'x', arg_value = c(1, 2, 3.3)), diff --git a/tests/testthat/test-orsf_vs.R b/tests/testthat/test-orsf_vs.R index c3bd5fce..0c4e52dd 100644 --- a/tests/testthat/test-orsf_vs.R +++ b/tests/testthat/test-orsf_vs.R @@ -1,5 +1,4 @@ - test_that( desc = "variable selection filters junk preds", code = { @@ -10,10 +9,16 @@ test_that( junk_names <- paste("junk", seq(n_junk_preds), sep ='_') + set.seed(329) + for(i in junk_names) pbc_with_junk[[i]] <- rnorm(nrow(pbc)) - fit <- orsf(pbc_with_junk, time + status ~ ., n_tree = 50) + fit <- orsf(pbc_with_junk, + time + status ~ ., + n_tree = 75, + importance = 'permute', + tree_seeds = seeds_standard) fit_var_select <- orsf_vs(fit, n_predictor_min = 10)