From dfad3d5d856ce4a90fa8c84780069c1a732cd064 Mon Sep 17 00:00:00 2001 From: be-marc Date: Thu, 7 Nov 2024 17:11:24 +0100 Subject: [PATCH] tests: replace expect_vector with expect_numeric --- tests/testthat/test_ensemble_fselect.R | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/testthat/test_ensemble_fselect.R b/tests/testthat/test_ensemble_fselect.R index bf0d7512..19bd1240 100644 --- a/tests/testthat/test_ensemble_fselect.R +++ b/tests/testthat/test_ensemble_fselect.R @@ -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) @@ -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) @@ -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")