Navigation Menu

Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mb706 committed Nov 10, 2021
1 parent 54c14da commit 2381eae
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 0 additions & 2 deletions R/operators.R
Expand Up @@ -81,8 +81,6 @@
#' o1 %>>!% o2
#'
#' o1 # not changed, becuase not a Graph.
#'
#' concat_graphs(glist = list(o1, o2, o3))
concat_graphs = function(g1, g2, in_place = FALSE) {
assert_flag(in_place)
# neutral elements handling
Expand Down
2 changes: 0 additions & 2 deletions man/concat_graphs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions tests/testthat/test_pipeop_subsample.R
Expand Up @@ -50,7 +50,7 @@ test_that("PipeOpSubsample works stratified", {
expect_true(tnew[[1]]$nrow == ceiling(task$nrow * 0.6))
# Proportions as expected
expect_equal(table(tnew[[1]]$data(cols = tnew[[1]]$target_names)),
table(rep(c("setosa", "versicolor", "virginica"), 30)))
table(list(Species = rep(c("setosa", "versicolor", "virginica"), 30))))

po = PipeOpSubsample$new()
po$param_set$values = list(stratify = TRUE, frac = 0.6, replace = TRUE)
Expand All @@ -60,7 +60,7 @@ test_that("PipeOpSubsample works stratified", {
expect_true(tnew[[1]]$nrow == ceiling(task$nrow * 0.6))
# Proportions as expected
expect_equal(table(tnew[[1]]$data(cols = tnew[[1]]$target_names)),
table(rep(c("setosa", "versicolor", "virginica"), 30)))
table(list(Species = rep(c("setosa", "versicolor", "virginica"), 30))))

po = PipeOpSubsample$new()
po$param_set$values = list(stratify = TRUE, frac = 2, replace = TRUE)
Expand All @@ -70,7 +70,7 @@ test_that("PipeOpSubsample works stratified", {
expect_true(tnew[[1]]$nrow == ceiling(task$nrow * 2))
# Proportions as expected
expect_equal(table(tnew[[1]]$data(cols = tnew[[1]]$target_names)),
table(rep(c("setosa", "versicolor", "virginica"), 100)))
table(list(Species = rep(c("setosa", "versicolor", "virginica"), 100))))
})


Expand Down

0 comments on commit 2381eae

Please sign in to comment.