tests/test_plans.R

library(future.tests)
library(future)

test_plans <- test_plans()
print(test_plans)

add_test_plan(plan(sequential))
add_test_plan(plan(multisession, workers = 1L))
add_test_plan(plan(multisession, workers = 2L))

test_plans <- test_plans()
print(test_plans)
stopifnot(length(test_plans) == 3L)

res <- along_test_plans({ 42L })
print(res)

Try the future.tests package in your browser

Any scripts or data that you put into this service are public.

future.tests documentation built on April 15, 2025, 9:06 a.m.