Skip to content

Commit

Permalink
Param: 100% test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
fouodo committed Jul 19, 2024
1 parent 7d3929b commit 8842ffa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 0 additions & 1 deletion .covrignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 10 additions & 1 deletion tests/testthat/test-Param.R
Original file line number Diff line number Diff line change
@@ -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()
})

0 comments on commit 8842ffa

Please sign in to comment.