Skip to content

Commit 6f2ae36

Browse files
committed
fix: no runtime tests on CRAN
1 parent bf8305b commit 6f2ae36

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

tests/testthat/test_Learner.R

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,9 @@ test_that("quantiles in LearnerRegr", {
637637
})
638638

639639
test_that("predict time is cumulative", {
640+
# no runtime test on CRAN
641+
skip_on_cran()
642+
640643
learner = lrn("classif.debug", sleep_predict = function() 0.05)
641644
task = tsk("iris")
642645
learner$train(task)$predict(task)
@@ -840,6 +843,9 @@ test_that("Learner printer for encapsulation", {
840843
})
841844

842845
test_that("error conditions are working: callr", {
846+
# no runtime test on CRAN
847+
skip_on_cran()
848+
843849
l = lrn("classif.debug",
844850
timeout = c(train = 0.01),
845851
# Sys.sleep does not get interrupted reliably
@@ -860,6 +866,9 @@ test_that("error conditions are working: callr", {
860866
})
861867

862868
test_that("error conditions are working: evaluate", {
869+
# no runtime test on CRAN
870+
skip_on_cran()
871+
863872
l = lrn("classif.debug",
864873
timeout = c(train = 0.2),
865874
# Sys.sleep does not get interrupted reliably
@@ -880,6 +889,9 @@ test_that("error conditions are working: evaluate", {
880889
})
881890

882891
test_that("error conditions are working: try", {
892+
# no runtime test on CRAN
893+
skip_on_cran()
894+
883895
l = lrn("classif.debug",
884896
timeout = c(train = 0.01),
885897
# Sys.sleep does not get interrupted reliably
@@ -900,6 +912,9 @@ test_that("error conditions are working: try", {
900912
})
901913

902914
test_that("error conditions are working: mirai", {
915+
# no runtime test on CRAN
916+
skip_on_cran()
917+
903918
l = lrn("classif.debug",
904919
timeout = c(train = 0.01),
905920
# Sys.sleep does not get interrupted reliably

tests/testthat/test_Measure.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@ test_that("time_train works with different predict type (#832)", {
125125
})
126126

127127
test_that("time_train is > 0", {
128+
# no runtime test on CRAN
128129
skip_on_cran()
130+
129131
rr = resample(tsk("iris"), lrn("classif.debug"), rsmp("holdout"))
130132
res = rr$score(msr("time_train"))
131133
expect_gte(res$time_train, 0)

0 commit comments

Comments
 (0)