Skip to content

Commit

Permalink
skip some tests if blockCV is not avail
Browse files Browse the repository at this point in the history
  • Loading branch information
pat-s committed Jun 14, 2022
1 parent aa5de5a commit 18a623b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/testthat/test-1-autoplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ test_that("plot() works for 'spcv_block'", {

test_that("plot() works for 'repeated_spcv_block'", {
skip_if_not_installed("vdiffr")
skip_if_not_installed("blockCV")
set.seed(42)

plots = prepare_autoplot("repeated_spcv_block",
Expand Down Expand Up @@ -350,6 +351,8 @@ test_that("plot() works for 'spcv_env'", {

test_that("plot() works for 'repeated_spcv_env'", {
skip_if_not_installed("vdiffr")
skip_if_not_installed("blockCV")

set.seed(42)

plots = prepare_autoplot("repeated_spcv_env",
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-ResamplingSpCVBlock.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ test_that("mlr3spatiotempcv indices are the same as blockCV indices: selection =

test_that("mlr3spatiotempcv indices are the same as blockCV indices: cols and rows", {
skip_if_not_installed("sf")
skip_if_not_installed("blockCV")
task = test_make_blockCV_test_task()

sf::sf_use_s2(use_s2 = FALSE)
Expand Down Expand Up @@ -104,6 +105,7 @@ test_that("mlr3spatiotempcv indices are the same as blockCV indices: cols and ro

test_that("mlr3spatiotempcv indices are the same as blockCV indices: rasterLayer", {
skip_if_not_installed("sf")
skip_if_not_installed("terra")

# cran test failure (Error: no arguments in initialization list)
testthat::skip_on_os("solaris")
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-mlr3pipelines-graph-integration.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
test_that("spcv methods work in a Graph Learner", {

skip_if_not_installed("mlr3pipelines")
skip_if_not_installed("blockCV")

# - spcv_buffer is missing due to runtime reasons
# - spcv_block is missing due to runtime reasons
Expand Down

0 comments on commit 18a623b

Please sign in to comment.