From 8842ffae26e9650295bb59b1ebe1ff7eefd61646 Mon Sep 17 00:00:00 2001 From: Cesaire Joris Kuete Fouodo Date: Fri, 19 Jul 2024 07:12:45 +0200 Subject: [PATCH] Param: 100% test coverage --- .covrignore | 1 - tests/testthat/test-Param.R | 11 ++++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.covrignore b/.covrignore index e02fd5e..47080a0 100644 --- a/.covrignore +++ b/.covrignore @@ -5,7 +5,6 @@ ./R/NewLayer.R ./R/NewMetaLayer.R ./R/NewStudy.R -./R/Param.R ./R/ParamLrner.R ./R/ParamVarSel.R ./R/predict.weightedMeanLearner.R diff --git a/tests/testthat/test-Param.R b/tests/testthat/test-Param.R index f6d5daa..5d262ed 100644 --- a/tests/testthat/test-Param.R +++ b/tests/testthat/test-Param.R @@ -1,7 +1,16 @@ ranger_param <- Param$new(id = "test_param", param_list = list(probability = TRUE, mtry = 1)) -test_that("Param instantiates correctly", { +test_that("Param: instantialize and print", { expect_true(R6::is.R6(ranger_param)) expect_equal(class(ranger_param)[1], "Param") + print(ranger_param) +}) + +test_that("Param: getId", { + ranger_param$getId() +}) + +test_that("Param: getParamList", { + ranger_param$getParamList() })