From d4572215568ad66d7de4b84a2f00e0e1c5e9f188 Mon Sep 17 00:00:00 2001 From: john Date: Mon, 18 Nov 2024 22:49:32 +0100 Subject: [PATCH] refactor: expect_vector => 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 90e7fbef..0759d4ff 100644 --- a/tests/testthat/test_ensemble_fselect.R +++ b/tests/testthat/test_ensemble_fselect.R @@ -16,9 +16,9 @@ test_that("efs 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_vector(efsr$result$classif.ce_inner, size = 4) + expect_numeric(efsr$result$n_features, len = 4) + expect_numeric(efsr$result$classif.ce, len = 4) + expect_numeric(efsr$result$classif.ce_inner, len = 4) expect_benchmark_result(efsr$benchmark_result) expect_equal(efsr$measure, "classif.ce") expect_true(efsr$minimize) # classification error @@ -89,9 +89,9 @@ test_that("efs 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_inner, size = 4) - expect_vector(efsr$result$classif.acc, size = 4) + expect_numeric(efsr$result$n_features, len = 4) + expect_numeric(efsr$result$classif.ce_inner, len = 4) + expect_numeric(efsr$result$classif.acc, len = 4) expect_list(efsr$result$importance, any.missing = FALSE, len = 4) expect_benchmark_result(efsr$benchmark_result) expect_equal(efsr$measure, "classif.acc")