Skip to content

Commit 3e42728

Browse files
committed
More conditional skips
1 parent 1edb2e9 commit 3e42728

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

tests/testthat/test-6-plans.R

+5
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ test_with_dir("warn about <- and -> in drake_plan()", {
7070

7171
test_with_dir("File functions handle input", {
7272
skip_on_cran() # CRAN gets essential tests only (check time limits).
73+
skip_if_not_installed("styler")
7374
expect_equal(
7475
file_in(1, "x", "y"), c("1", "x", "y")
7576
)
@@ -470,6 +471,7 @@ test_with_dir("plan_to_code()", {
470471

471472
test_with_dir("plan_to_notebook()", {
472473
skip_on_cran()
474+
skip_if_not_installed("styler")
473475
skip_if_not_installed("knitr")
474476
skip_if_not_installed("tibble")
475477
expect_false(file.exists("report.md"))
@@ -556,6 +558,7 @@ test_with_dir("drake_plan does tidy eval", {
556558
# From Alex Axthelm: https://github.com/ropensci/drake/issues/200
557559
test_with_dir("drake_plan tidy eval can be customized and disabled", {
558560
skip_on_cran() # CRAN gets essential tests only (check time limits).
561+
skip_if_not_installed("styler")
559562
my_variable <- 5
560563
plan1 <- drake_plan(
561564
a = !!my_variable,
@@ -608,6 +611,7 @@ test_with_dir("stringsAsFactors can be TRUE", {
608611

609612
test_with_dir("case sensitivity", {
610613
skip_on_cran()
614+
skip_if_not_installed("styler")
611615
plan <- drake_plan(
612616
a = 1,
613617
b = 2,
@@ -635,6 +639,7 @@ test_with_dir("Strings stay strings, not symbols", {
635639
})
636640

637641
test_with_dir("missing symbols get replaced (#1299)", {
642+
skip_if_not_installed("styler")
638643
plan <- drake_plan(x = NULL)
639644
expect_silent(make(plan, verbose = 0L, session_info = FALSE))
640645
})

tests/testthat/test-7-deprecate.R

+1
Original file line numberDiff line numberDiff line change
@@ -1598,6 +1598,7 @@ test_with_dir("move to caching = \"main\" at the top level", {
15981598
})
15991599

16001600
test_with_dir("move to caching = \"main\" at the target level", {
1601+
skip_if_not_installed("future")
16011602
plan <- drake_plan(x = target(1, caching = "master"))
16021603
expect_warning(
16031604
make(plan, caching = "worker", parallelism = "future"),

0 commit comments

Comments
 (0)