Skip to content

Commit b8bb483

Browse files
committed
tests: remove checkmate namespace prefix
1 parent 0c4c381 commit b8bb483

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

tests/testthat/helper_expectations.R

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,22 @@
11
expect_prediction_clust = function(p) {
22
expect_prediction(p)
3-
checkmate::expect_r6(p, "PredictionClust",
3+
expect_r6(p, "PredictionClust",
44
public = c("row_ids", "truth", "predict_types", "prob", "partition")
55
)
6-
checkmate::expect_numeric(p$truth, any.missing = TRUE, len = length(p$row_ids), null.ok = TRUE)
7-
checkmate::expect_numeric(p$partition,
6+
expect_numeric(p$truth, any.missing = TRUE, len = length(p$row_ids), null.ok = TRUE)
7+
expect_numeric(p$partition,
88
any.missing = FALSE, len = length(p$row_ids),
99
null.ok = TRUE
1010
)
1111
if ("prob" %in% p$predict_types) {
12-
checkmate::expect_matrix(p$prob, "numeric", any.missing = FALSE, nrows = length(p$row_ids))
12+
expect_matrix(p$prob, "numeric", any.missing = FALSE, nrows = length(p$row_ids))
1313
}
1414
}
1515

16-
expect_task_clust = function(task) {
17-
checkmate::expect_r6(task, "TaskClust")
18-
}
16+
expect_task_clust = function(task) expect_r6(task, "TaskClust")
1917

2018
expect_prediction_complete = function(p, predict_type) {
21-
expect_false(checkmate::anyMissing(p[[predict_type]]))
19+
expect_false(anyMissing(p[[predict_type]]))
2220
}
2321

2422
expect_prediction_exclusive = function(p, predict_type) {

tests/testthat/test_mlr_learners_clust_ap.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ test_that("Learner properties are respected", {
2424
parset = parset_list[[i]]
2525
learner$param_set$values = parset
2626

27-
suppressWarnings({p = learner$train(task)$predict(task)})
27+
p = suppressWarnings(learner$train(task)$predict(task))
2828
expect_prediction_clust(p)
2929

3030
if ("complete" %in% learner$properties) {

0 commit comments

Comments
 (0)