@@ -39,17 +39,23 @@ for (type in c("batchtools_interactive", "batchtools_local")) {
3939 }
4040 plan(type , registry = list (work.dir = NULL ))
4141 f <- future(42 , lazy = TRUE )
42- utils :: str(list (normalize_path(f $ config $ reg $ work.dir ), getwd = getwd()))
43- stopifnot(normalize_path(f $ config $ reg $ work.dir ) == getwd())
42+ # # In future releases, lazy futures may stay vanilla Future objects
43+ if (inherits(f , " BatchtoolsFuture" )) {
44+ utils :: str(list (normalize_path(f $ config $ reg $ work.dir ), getwd = getwd()))
45+ stopifnot(normalize_path(f $ config $ reg $ work.dir ) == getwd())
46+ }
4447
4548 path <- tempdir()
4649 plan(type , registry = list (work.dir = path ))
4750 f <- future(42 , lazy = TRUE )
48- utils :: str(list (
49- normalizePath(f $ config $ reg $ work.dir ),
50- path = normalizePath(path )
51- ))
52- stopifnot(normalize_path(f $ config $ reg $ work.dir ) == normalize_path(path ))
51+ # # In future releases, lazy futures may stay vanilla Future objects
52+ if (inherits(f , " BatchtoolsFuture" )) {
53+ utils :: str(list (
54+ normalizePath(f $ config $ reg $ work.dir ),
55+ path = normalizePath(path )
56+ ))
57+ stopifnot(normalize_path(f $ config $ reg $ work.dir ) == normalize_path(path ))
58+ }
5359
5460 mprintf(" *** plan('%s') ... DONE\n " , type )
5561} # for (type ...)
0 commit comments