From 4299dc94730aca5a1af1848c624723bcbdad876f Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 3 Dec 2024 14:11:25 +0100 Subject: [PATCH] update snapshots --- tests/testthat/_snaps/printing.md | 42 +++++++++++++++---------------- tests/testthat/test-printing.R | 5 ++-- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/tests/testthat/_snaps/printing.md b/tests/testthat/_snaps/printing.md index 6d0a56f3e..769e0e344 100644 --- a/tests/testthat/_snaps/printing.md +++ b/tests/testthat/_snaps/printing.md @@ -77,27 +77,6 @@ Uncertainty intervals (equal-tailed) and p-values (two-tailed) computed using a Wald z-distribution approximation. ---- - - Code - print(model_parameters(m)) - Output - # Fixed Effects - - Parameter | Log-Odds | SE | 95% CI | z | df | p - --------------------------------------------------------------------- - (Intercept) | -0.20 | 0.50 | [-1.18, 0.79] | -0.39 | 29.98 | 0.695 - - # Smooth Terms - - Parameter | z | df | p - --------------------------------------- - Smooth term (mpg) | 7.24 | 1.02 | 0.007 - Message - - The model has a log- or logit-link. Consider using `exponentiate = - TRUE` to interpret coefficients as ratios. - # adding model summaries Code @@ -382,3 +361,24 @@ Uncertainty intervals (equal-tailed) and p-values (two-tailed) computed using a Wald t-distribution approximation. +# no fail for mgcv-binomial + + Code + print(out) + Output + # Fixed Effects + + Parameter | Log-Odds | SE | 95% CI | z | df | p + --------------------------------------------------------------------- + (Intercept) | -0.20 | 0.50 | [-1.18, 0.79] | -0.39 | 29.98 | 0.695 + + # Smooth Terms + + Parameter | z | df | p + --------------------------------------- + Smooth term (mpg) | 7.24 | 1.02 | 0.007 + Message + + The model has a log- or logit-link. Consider using `exponentiate = + TRUE` to interpret coefficients as ratios. + diff --git a/tests/testthat/test-printing.R b/tests/testthat/test-printing.R index fc9192061..763c6acbb 100644 --- a/tests/testthat/test-printing.R +++ b/tests/testthat/test-printing.R @@ -121,9 +121,10 @@ withr::with_options( withr::with_options( list(parameters_warning_exponentiate = TRUE), - test_that("print model with multiple components", { + test_that("no fail for mgcv-binomial", { skip_if_not_installed("mgcv") m <- mgcv::gam(vs ~ s(mpg), data = mtcars, family = "binomial") - expect_snapshot(print(model_parameters(m))) + out <- model_parameters(m) + expect_snapshot(print(out)) }) )