diff --git a/inst/testthat/helper_functions.R b/inst/testthat/helper_functions.R index 9b2fe1a1b..ef480769e 100644 --- a/inst/testthat/helper_functions.R +++ b/inst/testthat/helper_functions.R @@ -437,7 +437,7 @@ expect_datapreproc_pipeop_class = function(poclass, constargs = list(), task, expect_true(task$nrow >= 5) # overlap between use and test rows - tasktrain$divide(tasktrain$row_roles$use[seq(n_use - 2, n_use)], remove = FALSE) + tasktrain$divide(ids = tasktrain$row_roles$use[seq(n_use - 2, n_use)], remove = FALSE) tasktrain$row_roles$use = tasktrain$row_roles$use[seq(1, n_use - 2)] taskpredict = tasktrain$clone(deep = TRUE) diff --git a/tests/testthat/test_pipeop_impute.R b/tests/testthat/test_pipeop_impute.R index 9271b3697..61426e936 100644 --- a/tests/testthat/test_pipeop_impute.R +++ b/tests/testthat/test_pipeop_impute.R @@ -406,7 +406,7 @@ test_that("More tests for Integers", { test_that("impute, test rows and affect_columns", { po_impute = po("imputeconstant", affect_columns = selector_name("insulin"), constant = 2) task = tsk("pima") - task$divide(1:30) + task$divide(ids = 1:30) outtrain = po_impute$train(list(task))[[1L]] outpredict = po_impute$predict(list(task$internal_valid_task))[[1L]] expect_true(isTRUE(all.equal(outtrain$internal_valid_task$data(), outpredict$data())))