Skip to content

Commit eb9dfde

Browse files
TESTS: Enable 'plan() - interrupts = NA/FALSE/TRUE' test by default. Produce error on warnings for future (> 1.68.0)
1 parent e4b83c3 commit eb9dfde

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: future.tests
22
Title: Test Suite for 'Future API' Backends
3-
Version: 0.9.0-9007
3+
Version: 0.9.0-9008
44
Authors@R: c(
55
person("Henrik", "Bengtsson", role = c("aut", "cre", "cph"), email = "[email protected]"),
66
person(family = "The R Consortium", comment = "Project was awarded an Infrastructure Steering Committee (ISC) grant in 2017", role = "fnd"))

NEWS.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010

1111
* Add tests for `cancel()`.
1212

13-
* Under development:
14-
15-
- Assert that `plan()` accepts argument `interrupts`.
13+
* Assert that `plan()` accepts argument `interrupts`.
1614

1715

1816
# Version 0.9.0 [2025-04-14]

inst/test-db/plan.R

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ make_test(title = "plan() - workers=<invalid>", args = list(), tags = c("plan",
111111
})
112112

113113

114-
make_test(title = "plan() - interrupts = NA/FALSE/TRUE", args = list(), tags = c("plan", "devel"), {
114+
make_test(title = "plan() - interrupts = NA/FALSE/TRUE", args = list(), tags = c("plan", "interrupts"), {
115115
current_plan <- plan()
116116
print(current_plan)
117117

@@ -124,7 +124,11 @@ make_test(title = "plan() - interrupts = NA/FALSE/TRUE", args = list(), tags = c
124124
plan(current_plan, interrupts = interrupts)
125125
}
126126
}, warning = function(w) {
127-
stop(conditionMessage(w))
127+
if (packageVersion("future") > "1.68.0") {
128+
stop(conditionMessage(w))
129+
} else {
130+
warning(conditionMessage(w))
131+
}
128132
})
129133
}
130134
})

0 commit comments

Comments
 (0)