From c18b6710672619a2fbba65f7d0f0be49497a5091 Mon Sep 17 00:00:00 2001 From: Lukas Burk Date: Wed, 18 Oct 2023 09:40:21 +0200 Subject: [PATCH] chore: update rpf paramtests to current template --- .../test_paramtest_randomPlantedForest_classif_rpf.R | 8 ++++---- .../test_paramtest_randomPlantedForest_regr_rpf.R | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/testthat/test_paramtest_randomPlantedForest_classif_rpf.R b/tests/testthat/test_paramtest_randomPlantedForest_classif_rpf.R index 4ffa5b957..8ee422f09 100644 --- a/tests/testthat/test_paramtest_randomPlantedForest_classif_rpf.R +++ b/tests/testthat/test_paramtest_randomPlantedForest_classif_rpf.R @@ -1,6 +1,6 @@ test_that("classif.rpf train", { learner = lrn("classif.rpf") - fun.list = list(randomPlantedForest:::rpf.data.frame) + fun = randomPlantedForest:::rpf.data.frame exclude = c( "x", "y", # handled internally "max_interaction_ratio", @@ -9,13 +9,13 @@ test_that("classif.rpf train", { # note that you can also pass a list of functions in case $.train calls more than one # function, e.g. for control arguments - paramtest = run_paramtest(learner, fun.list, exclude, tag = "train") + paramtest = run_paramtest(learner, fun, exclude, tag = "train") expect_paramtest(paramtest) }) test_that("classif.rpf predict", { learner = lrn("classif.rpf") - fun.list = list(predict) # nolint + fun = predict # nolint exclude = c( "object", # handled internally "data", # handled internally @@ -23,6 +23,6 @@ test_that("classif.rpf predict", { "type" # Not sure but handled by predict_type? ) - paramtest = run_paramtest(learner, fun.list, exclude, tag = "predict") + paramtest = run_paramtest(learner, fun, exclude, tag = "predict") expect_paramtest(paramtest) }) diff --git a/tests/testthat/test_paramtest_randomPlantedForest_regr_rpf.R b/tests/testthat/test_paramtest_randomPlantedForest_regr_rpf.R index 3efcef864..47e831bf3 100644 --- a/tests/testthat/test_paramtest_randomPlantedForest_regr_rpf.R +++ b/tests/testthat/test_paramtest_randomPlantedForest_regr_rpf.R @@ -1,6 +1,6 @@ test_that("regr.rpf train", { learner = lrn("regr.rpf") - fun.list = list(randomPlantedForest:::rpf.data.frame) + fun = randomPlantedForest:::rpf.data.frame exclude = c( "x", "y", # handled internally "loss", # Not applicable for regression learner @@ -12,13 +12,13 @@ test_that("regr.rpf train", { # note that you can also pass a list of functions in case $.train calls more than one # function, e.g. for control arguments - paramtest = run_paramtest(learner, fun.list, exclude, tag = "train") + paramtest = run_paramtest(learner, fun, exclude, tag = "train") expect_paramtest(paramtest) }) test_that("regr.rpf predict", { learner = lrn("regr.rpf") - fun.list = list(predict) # nolint + fun = predict # nolint exclude = c( "object", # handled internally "data", # handled internally @@ -26,6 +26,6 @@ test_that("regr.rpf predict", { "type" # Not sure but handled by predict_type? ) - paramtest = run_paramtest(learner, fun.list, exclude, tag = "predict") + paramtest = run_paramtest(learner, fun, exclude, tag = "predict") expect_paramtest(paramtest) })