R version 4.6.0 RC (2026-04-22 r89945 ucrt) -- "Because it was There" Copyright (C) 2026 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > #! /usr/bin/env Rscript > ## This runs testme test script inst/testme/test-batchtools_interactive.R > ## Don't edit - it was autogenerated by inst/testme/deploy.R > future.batchtools:::testme("batchtools_interactive") Test 'batchtools_interactive' ... chr "none" > library(future) > library(listenv) > message("*** batchtools_interactive() ...") *** batchtools_interactive() ... > message("*** batchtools_interactive() without globals") *** batchtools_interactive() without globals > plan(future.batchtools::batchtools_interactive) > f <- future({ + 42 + }) > stopifnot(inherits(f, "BatchtoolsFuture")) > print(is_resolved <- resolved(f)) [1] TRUE > stopifnot(is_resolved) > y <- value(f) > print(y) [1] 42 > stopifnot(y == 42) > message("*** batchtools_interactive() with globals") *** batchtools_interactive() with globals > a <- 0 > f <- future({ + b <- 3 + c <- 2 + a * b * c + }) > a <- 7 > v <- value(f) > print(v) [1] 0 > stopifnot(v == 0) > message("*** batchtools_interactive() with globals (tricky)") *** batchtools_interactive() with globals (tricky) > x <- listenv() > for (ii in 1:2) x[[ii]] <- future({ + ii + }, globals = TRUE) > v <- unlist(value(x)) > stopifnot(all(v == 1:2)) > message("*** batchtools_interactive() and errors") *** batchtools_interactive() and errors > f <- future({ + stop("Whoops!") + 1 + }) > v <- value(f, signal = FALSE) Warning in delete.BatchtoolsFuture(future) : Will not remove batchtools registry, because the status of the batchtools was 'error', 'defined', 'finished', 'started', 'submitted' and future backend argument 'delete' is 'on-success': 'D:/temp/2026_04_25_00_50_17_18966/RtmpQVMfHq/.future/20260425_005134-QVMfHq/batchtools_752295195' > print(v) > stopifnot(inherits(v, "error")) > res <- try({ + v <- value(f) + }, silent = TRUE) > print(res) [1] "Error in eval(quote({ : Whoops!\n" attr(,"class") [1] "try-error" attr(,"condition") > stopifnot(inherits(res, "try-error")) > res <- try(value(f), silent = TRUE) > print(res) [1] "Error in eval(quote({ : Whoops!\n" attr(,"class") [1] "try-error" attr(,"condition") > stopifnot(inherits(res, "try-error")) > message("*** batchtools_interactive() ... DONE") *** batchtools_interactive() ... DONE Failed to undo environment variables: - Expected environment variables: [n=220] '!ExitCode', 'ALLUSERSPROFILE', 'APPDATA', ..., 'tempdirname' - Environment variables still there: [n=0] - Environment variables missing: [n=1] 'MAKEFLAGS' Differences environment variable by environment variable: Skipping, because path appears not to be an 'R CMD check' folder: 'D:/temp/2026_04_25_00_50_17_18966' Test time: user.self=0.9s, sys.self=0.07s, elapsed=1s, user.child=NAs, sys.child=NAs Test 'tempdirname' ... success > > proc.time() user system elapsed 1.64 0.35 2.03 Warning message: In delete.BatchtoolsFuture(f, onRunning = "skip", onMissing = "ignore", : Will not remove batchtools registry, because the status of the batchtools was 'error', 'defined', 'finished', 'started', 'submitted' and future backend argument 'delete' is 'on-success': 'D:/temp/2026_04_25_00_50_17_18966/RtmpQVMfHq/.future/20260425_005134-QVMfHq/batchtools_752295195'