From 00ca320d0cc957c290c58e34ab333f2a25827d88 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Thu, 11 Jan 2024 19:39:13 +0200 Subject: [PATCH] Update test for new methods --- tests/testthat/test-fit-shared.R | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/testthat/test-fit-shared.R b/tests/testthat/test-fit-shared.R index 85c69eb4..691db31c 100644 --- a/tests/testthat/test-fit-shared.R +++ b/tests/testthat/test-fit-shared.R @@ -288,7 +288,7 @@ test_that("CmdStanArgs erorrs if idx is out of proc_ids range", { ) }) -test_that("no output with refresh = 0", { +test_that("no output with show_messages = FALSE", { mod <- testing_model("logistic") data_list <- testing_data("logistic") output <- utils::capture.output(tmp <- mod$variational(data = data_list, seed = 123)) @@ -298,12 +298,12 @@ test_that("no output with refresh = 0", { output <- utils::capture.output(tmp <- mod$sample(data = data_list, chains = 1, seed = 123)) expect_gt(length(output), 1) - output <- utils::capture.output(tmp <- mod$variational(data = data_list, refresh = 0, seed = 123)) - expect_equal(length(output), 1) - output <- utils::capture.output(tmp <- mod$optimize(data = data_list, refresh = 0, seed = 123)) - expect_equal(length(output), 1) - output <- utils::capture.output(tmp <- mod$sample(data = data_list, refresh = 0, chains = 1, seed = 123)) - expect_equal(length(output), 3) + output <- utils::capture.output(tmp <- mod$variational(data = data_list, show_messages = FALSE, seed = 123)) + expect_equal(length(output), 0) + output <- utils::capture.output(tmp <- mod$optimize(data = data_list, show_messages = FALSE, seed = 123)) + expect_equal(length(output), 0) + output <- utils::capture.output(tmp <- mod$sample(data = data_list, show_messages = FALSE, chains = 1, seed = 123)) + expect_equal(length(output), 0) }) test_that("sig_figs works with all methods", {