Skip to content

Commit

Permalink
Skip some tests on CRAN
Browse files Browse the repository at this point in the history
  • Loading branch information
be-marc committed Oct 29, 2020
1 parent a444c54 commit 0ed7fbb
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/testthat/test_AutoFSelector.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
context("AutoFSelector")

test_that("train and predict work", {
skip_on_cran()

task = TEST_MAKE_TSK()
learner = lrn("regr.rpart")
resampling = rsmp("holdout")
Expand All @@ -26,6 +28,8 @@ test_that("train and predict work", {
})

test_that("nested resampling works", {
skip_on_cran()

task = TEST_MAKE_TSK()
learner = lrn("regr.rpart")
resampling_inner = rsmp("holdout")
Expand Down Expand Up @@ -60,6 +64,8 @@ test_that("nested resampling works", {
})

test_that("store_fselect_instance, store_benchmark_result and store_models flags work", {
skip_on_cran()

te = trm("evals", n_evals = 10)
task = tsk("iris")
ms = msr("classif.ce")
Expand Down
4 changes: 4 additions & 0 deletions tests/testthat/test_FSelectorExhaustiveSearch.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
context("FSelectorExhaustive")

test_that("FSelectorExhaustive", {
skip_on_cran()

test_fselector("exhaustive_search", term_evals = 2, real_evals = 4)
test_fselector("exhaustive_search", term_evals = 4, real_evals = 4)

Expand Down Expand Up @@ -28,5 +30,7 @@ test_that("FSelectorExhaustive", {
})

test_that("FSelectorExhaustive works with multi-crit", {
skip_on_cran()

test_fselector_2D("exhaustive_search", term_evals = 4, real_evals = 4)
})
1 change: 1 addition & 0 deletions tests/testthat/test_FSelectorRFE.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
context("FSelectorRFE")

test_that("FSelectorRFE", {
skip_on_cran()

z = test_fselector("rfe", term_evals = 3L, store_models = TRUE)
a = z$inst$archive$data()
Expand Down
4 changes: 4 additions & 0 deletions tests/testthat/test_FSelectorSequential.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
context("FSelectorSequential")

test_that("FSelectorSequential", {
skip_on_cran()

test_fselector("sequential", term_evals = 2, real_evals = 4)
test_fselector("sequential", term_evals = 10, real_evals = 10)

Expand Down Expand Up @@ -29,6 +31,8 @@ test_that("FSelectorSequential", {
})

test_that("optimization_path method works", {
skip_on_cran()

z = test_fselector("sequential", term_evals = 10, store_models = TRUE)
op = z$fselector$optimization_path(z$inst)
expect_data_table(op, nrows = 4)
Expand Down

0 comments on commit 0ed7fbb

Please sign in to comment.