Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions tests/testthat/test-failed-chains.R
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,12 @@ test_that("gq chains error on wrong input CSV", {
mod <- testing_model("bernoulli_ppc")
data_list <- testing_data("bernoulli_ppc")
suppressWarnings(
expect_message(
mod$generate_quantities(data = data_list, fitted_params = fit_logistic$output_files()),
"Mismatch between model and fitted_parameters csv"
expect_output(
expect_message(
mod$generate_quantities(data = data_list, fitted_params = fit_logistic$output_files()),
"Mismatch between model and fitted_parameters csv"
),
"Running standalone generated quantities"
)
)
expect_warning(
Expand Down
4 changes: 3 additions & 1 deletion tests/testthat/test-fit-mcmc.R
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,9 @@ test_that("loo method works with moment-matching", {
# Moment-matching needs model-methods, so make sure hpp is available
mod <- cmdstan_model(testing_stan_file("loo_moment_match"), force_recompile = TRUE)
data_list <- testing_data("loo_moment_match")
fit <- mod$sample(data = data_list, chains = 1, seed = 1000)
utils::capture.output(
fit <- mod$sample(data = data_list, chains = 1, seed = 1000)
)

# Regular loo should warn that some pareto-k are "too high"
expect_warning(
Expand Down
Loading