From b76c4684f62e4aa9dd60301c2b95ccc7f7fed070 Mon Sep 17 00:00:00 2001 From: jgabry Date: Mon, 1 Sep 2025 13:03:01 -0600 Subject: [PATCH] update loo PIT visual tests closes #373 --- .../ppc-loo/ppc-loo-pit-overlay-default.svg | 202 +++++++++--------- .../_snaps/ppc-loo/ppc-loo-pit-qq-default.svg | 8 + tests/testthat/test-ppc-loo.R | 4 +- 3 files changed, 111 insertions(+), 103 deletions(-) diff --git a/tests/testthat/_snaps/ppc-loo/ppc-loo-pit-overlay-default.svg b/tests/testthat/_snaps/ppc-loo/ppc-loo-pit-overlay-default.svg index 82d31030..87711ce8 100644 --- a/tests/testthat/_snaps/ppc-loo/ppc-loo-pit-overlay-default.svg +++ b/tests/testthat/_snaps/ppc-loo/ppc-loo-pit-overlay-default.svg @@ -25,107 +25,107 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/testthat/_snaps/ppc-loo/ppc-loo-pit-qq-default.svg b/tests/testthat/_snaps/ppc-loo/ppc-loo-pit-qq-default.svg index 5093dd94..baa1d4c4 100644 --- a/tests/testthat/_snaps/ppc-loo/ppc-loo-pit-qq-default.svg +++ b/tests/testthat/_snaps/ppc-loo/ppc-loo-pit-qq-default.svg @@ -117,6 +117,14 @@ + + + + + + + + diff --git a/tests/testthat/test-ppc-loo.R b/tests/testthat/test-ppc-loo.R index 45377f5f..6e3f34ca 100644 --- a/tests/testthat/test-ppc-loo.R +++ b/tests/testthat/test-ppc-loo.R @@ -213,7 +213,7 @@ test_that("ppc_loo_pit_overlay renders correctly", { skip_if_not_installed("vdiffr") skip_if_not_installed("loo") skip_on_r_oldrel() - skip_if(packageVersion("rstantools") > "2.4.0") + skip_if(packageVersion("rstantools") <= "2.4.0") p_base <- suppressMessages(ppc_loo_pit_overlay(vdiff_loo_y, vdiff_loo_yrep, vdiff_loo_lw)) vdiffr::expect_doppelganger("ppc_loo_pit_overlay (default)", p_base) @@ -232,7 +232,7 @@ test_that("ppc_loo_pit_qq renders correctly", { skip_if_not_installed("vdiffr") skip_if_not_installed("loo") skip_on_r_oldrel() - skip_if(packageVersion("rstantools") > "2.4.0") + skip_if(packageVersion("rstantools") <= "2.4.0") p_base <- ppc_loo_pit_qq(vdiff_loo_y, vdiff_loo_yrep, vdiff_loo_lw) vdiffr::expect_doppelganger("ppc_loo_pit_qq (default)", p_base)