Skip to content

Commit 2b7128d

Browse files
committed
adapt err msg in unit tests according to 03fa147
1 parent 03fa147 commit 2b7128d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/testthat/test-double_ml_plr_classifier.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ test_that("Unit tests for exception handling of PLR with classifier for ml_m:",
100100
double_mlplr_obj = DoubleMLPLR$new(data = dml_data,
101101
ml_g = mlr3::lrn('regr.rpart'),
102102
ml_m = mlr3::lrn('classif.rpart'))
103-
msg = paste("Assertion on 'rhs' failed: Must be element of set \\{'0','2'\\},",
104-
"but is '1'.")
103+
msg = paste("Assertion on 'levels\\(data\\[\\[target\\]\\])' failed:",
104+
"Must be equal to set \\{'0','1'\\}, but is \\{'0','2'\\}.")
105105
expect_error(double_mlplr_obj$fit(),
106106
regexp = msg)
107107

@@ -112,7 +112,7 @@ test_that("Unit tests for exception handling of PLR with classifier for ml_m:",
112112
double_mlplr_obj = DoubleMLPLR$new(data = dml_data,
113113
ml_g = mlr3::lrn('regr.rpart'),
114114
ml_m = mlr3::lrn('classif.rpart'))
115-
msg = paste("Assertion on 'c\\(task\\$positive, task\\$negative\\)' failed:",
115+
msg = paste("Assertion on 'levels\\(data\\[\\[target\\]\\])' failed:",
116116
"Must be equal to set \\{'0','1'\\}, but is \\{'1','1.5'\\}.")
117117
expect_error(double_mlplr_obj$fit(),
118118
regexp = msg)

0 commit comments

Comments
 (0)