From 40115cc149548be1764d4c475d56110cd5770101 Mon Sep 17 00:00:00 2001 From: jtalboys Date: Thu, 26 Sep 2024 15:49:44 +0200 Subject: [PATCH] remove test from ard_categorical --- tests/testthat/_snaps/ard_categorical.md | 17 ----------------- tests/testthat/test-ard_categorical.R | 7 ------- 2 files changed, 24 deletions(-) diff --git a/tests/testthat/_snaps/ard_categorical.md b/tests/testthat/_snaps/ard_categorical.md index 2385314f..0620aaf6 100644 --- a/tests/testthat/_snaps/ard_categorical.md +++ b/tests/testthat/_snaps/ard_categorical.md @@ -188,23 +188,6 @@ # ard_categorical() errors with incomplete factor columns - Code - ard_categorical(dplyr::mutate(mtcars, am = factor(am)), variables = am) - Message - {cards} data frame: 6 x 9 - Output - variable variable_level context stat_name stat_label stat - 1 am 0 categori… n n 19 - 2 am 0 categori… N N 32 - 3 am 0 categori… p % 0.594 - 4 am 1 categori… n n 13 - 5 am 1 categori… N N 32 - 6 am 1 categori… p % 0.406 - Message - i 3 more variables: fmt_fn, warning, error - ---- - Code ard_categorical(dplyr::mutate(mtcars, am = factor(am, levels = character(0))), variables = am) diff --git a/tests/testthat/test-ard_categorical.R b/tests/testthat/test-ard_categorical.R index ef7a40e9..76ff0b63 100644 --- a/tests/testthat/test-ard_categorical.R +++ b/tests/testthat/test-ard_categorical.R @@ -870,13 +870,6 @@ test_that("ard_categorical() with hms times", { }) test_that("ard_categorical() errors with incomplete factor columns", { - # First check output is fine when there is a valid factor variable - expect_snapshot( - mtcars |> - dplyr::mutate(am = factor(am)) |> - ard_categorical(variables = am) - ) - # Check error when factors have no levels expect_snapshot( error = TRUE,