Skip to content

Commit

Permalink
Add integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
richfitz committed Nov 6, 2024
1 parent 09a5394 commit b0542c9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/testthat/test-runner-callr.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,13 @@ test_that("can continue parallel runs", {

expect_equal(res2b, res1b)
})


test_that("can produce progress bars", {
m <- monty_example("banana")
s <- monty_sampler_random_walk(vcv = diag(2) * 0.02)
r <- monty_runner_callr(2, progress = TRUE)
res <- evaluate_promise(monty_sample(m, s, 100, n_chains = 4, runner = r))
expect_match(res$messages, "Sampled 400 steps across 4 chains in",
all = FALSE)
})

0 comments on commit b0542c9

Please sign in to comment.