From eedb190272b0656077409dac1b5b4d750ce29c29 Mon Sep 17 00:00:00 2001 From: bcjaeger Date: Tue, 30 Apr 2024 17:08:05 -0400 Subject: [PATCH] add tests for all cats --- tests/testthat/test-orsf.R | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/testthat/test-orsf.R b/tests/testthat/test-orsf.R index 823aeb37..5b882d0c 100644 --- a/tests/testthat/test-orsf.R +++ b/tests/testthat/test-orsf.R @@ -988,3 +988,20 @@ test_that( } ) + +test_that( + desc = "data without numerics are allowed", + code = { + + fit <- orsf(pbc_orsf, time + status ~ sex + trt, n_tree = n_tree_test) + + expect_true(all(is.na(fit$get_bounds()))) + + expect_equal(length(orsf_vi(fit)), 2L) + + skip_on_cran() + # don't require too much compute time from cran + expect_equal(nrow(orsf_pd_oob(fit, pred_spec_auto(sex, trt))), 4L) + + } +)