Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sebffischer committed May 30, 2024
1 parent dcdc081 commit 4122fc5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion inst/testthat/helper_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test_pipeop_impute.R
Original file line number Diff line number Diff line change
Expand Up @@ -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())))
Expand Down

0 comments on commit 4122fc5

Please sign in to comment.