Skip to content

Commit

Permalink
tests: replace expect_vector with expect_numeric
Browse files Browse the repository at this point in the history
  • Loading branch information
be-marc committed Nov 7, 2024
1 parent 415af49 commit dfad3d5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/testthat/test_ensemble_fselect.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ test_that("ensemble feature selection works", {
expect_character(efsr$man)
expect_data_table(efsr$result, nrows = 4)
expect_list(efsr$result$features, any.missing = FALSE, len = 4)
expect_vector(efsr$result$n_features, size = 4)
expect_vector(efsr$result$classif.ce, size = 4)
expect_numeric(efsr$result$n_features, len = 4)
expect_numeric(efsr$result$classif.ce, len = 4)
expect_benchmark_result(efsr$benchmark_result)
expect_equal(efsr$measure, "classif.ce")
expect_equal(efsr$n_learners, 2)
Expand Down Expand Up @@ -72,8 +72,8 @@ test_that("ensemble feature selection works without benchmark result", {
expect_character(efsr$man)
expect_data_table(efsr$result, nrows = 4)
expect_list(efsr$result$features, any.missing = FALSE, len = 4)
expect_vector(efsr$result$n_features, size = 4)
expect_vector(efsr$result$classif.ce, size = 4)
expect_numeric(efsr$result$n_features, len = 4)
expect_numeric(efsr$result$classif.ce, len = 4)
expect_null(efsr$benchmark_result)
expect_equal(efsr$measure, "classif.ce")
expect_equal(efsr$n_learners, 2)
Expand Down Expand Up @@ -121,8 +121,8 @@ test_that("ensemble feature selection works with rfe", {
expect_character(efsr$man)
expect_data_table(efsr$result, nrows = 4)
expect_list(efsr$result$features, any.missing = FALSE, len = 4)
expect_vector(efsr$result$n_features, size = 4)
expect_vector(efsr$result$classif.ce, size = 4)
expect_numeric(efsr$result$n_features, len = 4)
expect_numeric(efsr$result$classif.ce, len = 4)
expect_list(efsr$result$importance, any.missing = FALSE, len = 4)
expect_benchmark_result(efsr$benchmark_result)
expect_equal(efsr$measure, "classif.ce")
Expand Down

0 comments on commit dfad3d5

Please sign in to comment.