Skip to content

disable verbosity for failing chains #433

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jul 24, 2023
Prev Previous commit
Next Next commit
fix regional_epinow short timeout tests
  • Loading branch information
sbfnk committed Jul 22, 2023
commit 8834bfbf9f068ee595253451b635e8f686173c81
20 changes: 10 additions & 10 deletions tests/testthat/test-regional_epinow.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ test_that("regional_epinow produces expected output when run with default settin
})

test_that("regional_epinow runs without error when given a very short timeout", {
expect_error(
regional_epinow(
output <- capture.output(suppressMessages(
out <- regional_epinow(
reported_cases = cases,
generation_time = generation_time_opts(generation_time),
delays = delay_opts(reporting_delay),
Expand All @@ -62,11 +62,11 @@ test_that("regional_epinow runs without error when given a very short timeout",
control = list(adapt_delta = 0.8),
max_execution_time = 1
), logs = NULL, verbose = FALSE
),
NA
)
expect_error(
regional_epinow(
)
))
expect_true(all(vapply(out$regional, function(x) !is.null(x$error), TRUE)))
output <- capture.output(suppressMessages(
out <- regional_epinow(
reported_cases = cases,
generation_time = generation_time_opts(generation_time),
delays = delay_opts(reporting_delay),
Expand All @@ -76,9 +76,9 @@ test_that("regional_epinow runs without error when given a very short timeout",
control = list(adapt_delta = 0.8),
max_execution_time = 1, future = TRUE
), logs = NULL, verbose = FALSE
),
NA
)
)
))
expect_true(all(vapply(out$regional, function(x) !is.null(x$error), TRUE)))
})


Expand Down