Skip to content

Commit f95831e

Browse files
make_test(): register test by default, unless there is a 'devel' tag and R option 'future.tests.devel' is not TRUE
1 parent f064846 commit f95831e

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
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-9001
3+
Version: 0.9.0-9002
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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
* Add logical R option `future.tests.devel`, which can be set by
66
environment variable `R_FUTURE_TESTS_DEVEL`. This controls whether
7-
tests "under developement" will be run.
7+
tests with a `"devel"` ("under developement") tag will be included.
88

99
## Test Updates
1010

R/make_test.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@
1414
#' futures.
1515
#'
1616
#' @param register If TRUE, the test is registered in the test database,
17-
#' otherwise not.
17+
#' otherwise not. The default is to register the test, unless `tags` contains
18+
#' `"devel"`.
1819
#'
1920
#' @return (invisibly) A Test.
2021
#'
2122
#' @export
22-
make_test <- function(expr, title = NA_character_, args = list(), tags = NULL, substitute = TRUE, reset_workers = FALSE, register = TRUE) {
23+
make_test <- function(expr, title = NA_character_, args = list(), tags = NULL, substitute = TRUE, reset_workers = FALSE, register = !("devel" %in% tags) || isTRUE(getOption("future.tests.devel"))) {
2324
title <- as.character(title)
2425
stopifnot(length(title) == 1L, nzchar(title))
2526
if (length(args) > 0) stopifnot(is.list(args), !is.null(names(args)))

inst/test-db/plan.R

Lines changed: 1 addition & 1 deletion
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"), register = getOption("future.tests.devel", FALSE), {
114+
make_test(title = "plan() - interrupts = NA/FALSE/TRUE", args = list(), tags = c("plan", "devel"), {
115115
current_plan <- plan()
116116
print(current_plan)
117117

man/make_test.Rd

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)