Skip to content

Commit a48a3dd

Browse files
TESTS: Add package test with 'furrr' too
1 parent ee91327 commit a48a3dd

File tree

3 files changed

+26
-10
lines changed

3 files changed

+26
-10
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
*~
33
**/*~
44
.local
5+
inst/doc

DESCRIPTION

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,23 @@ Authors@R: c(
77
email = "henrikb@braju.com"))
88
License: GPL (>= 3)
99
Imports:
10-
digest
10+
digest
1111
Suggests:
12-
utils,
13-
tcltk,
14-
beepr,
15-
notifier,
16-
pbmcapply,
17-
plyr,
18-
progress,
19-
future.apply,
20-
doFuture
12+
utils,
13+
tcltk,
14+
beepr,
15+
notifier,
16+
pbmcapply,
17+
plyr,
18+
progress,
19+
## For testing purposes:
20+
doFuture,
21+
future.apply,
22+
furrr
2123
Remotes:
2224
gaborcsardi/notifier@d92b1b6
2325
URL: https://github.com/HenrikBengtsson/progressr
2426
BugReports: https://github.com/HenrikBengtsson/progressr/issues
2527
RoxygenNote: 6.1.1
2628
Roxygen: list(markdown = TRUE)
29+

tests/zzz,furrr.R

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
library(progressr)
2+
options(progressr.interval = 0.0, progressr.delay = 0.01)
3+
4+
if (requireNamespace("furrr", quietly = TRUE)) {
5+
with_progress({
6+
p <- progressor(10)
7+
y <- furrr::future_map(1:10, function(x) {
8+
p()
9+
slow_sum(x, stdout=TRUE, message=TRUE)
10+
})
11+
})
12+
}

0 commit comments

Comments
 (0)