Skip to content

Commit

Permalink
more new paradox syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
mb706 committed Jan 14, 2024
1 parent e6f7558 commit 90950c1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/testthat/test_SurrogateLearnerCollection.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ test_that("SurrogateLearnerCollection API works", {
# upgrading error class works
surrogate = SurrogateLearnerCollection$new(learners = list(LearnerRegrError$new(), LearnerRegrError$new()), archive = inst$archive)
expect_error(surrogate$update(), class = "surrogate_update_error")

surrogate$param_set$values$catch_errors = FALSE
expect_error(surrogate$optimize(), class = "simpleError")

Expand Down Expand Up @@ -61,10 +61,10 @@ test_that("param_set", {
surrogate = SurrogateLearnerCollection$new(learner = list(REGR_FEATURELESS, REGR_FEATURELESS$clone(deep = TRUE)), archive = inst$archive)
expect_r6(surrogate$param_set, "ParamSet")
expect_setequal(surrogate$param_set$ids(), c("assert_insample_perf", "perf_measures", "perf_thresholds", "catch_errors"))
expect_r6(surrogate$param_set$params$assert_insample_perf, "ParamLgl")
expect_r6(surrogate$param_set$params$perf_measure, "ParamUty")
expect_r6(surrogate$param_set$params$perf_threshold, "ParamUty")
expect_r6(surrogate$param_set$params$catch_errors, "ParamLgl")
expect_equal(surrogate$param_set$class[["assert_insample_perf"]], "ParamLgl")
expect_equal(surrogate$param_set$class[["perf_measure"]], "ParamUty")
expect_equal(surrogate$param_set$class[["perf_threshold"]], "ParamUty")
expect_equal(surrogate$param_set$class[["catch_errors"]], "ParamLgl")
expect_error({surrogate$param_set = list()}, regexp = "param_set is read-only.")
})

Expand Down

0 comments on commit 90950c1

Please sign in to comment.