Skip to content

Commit 72689bb

Browse files
author
Florence Bockting
committed
tests: update test to support new loo_compare output structure
1 parent 9cf0f89 commit 72689bb

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tests/testthat/test-loo_kfold.R

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,11 @@ if (.if_run_ex_eval_mod()) {
104104
})
105105

106106
test_that("kfold", {
107-
expect_gt(comp[[2, 1]], -0.5)
107+
if ("model" %in% colnames(comp)) {
108+
expect_gt(comp[[2, 2]], -0.5)
109+
} else {
110+
expect_gt(comp[[2, 1]], -0.5)
111+
}
108112
expect_equal(
109113
kfold_ermod_bin$estimates[, 1],
110114
c(elpd_kfold = -38.242947, p_kfold = 3.040264, kfoldic = 76.485893)

0 commit comments

Comments
 (0)