Skip to content

Commit

Permalink
fixes for good
Browse files Browse the repository at this point in the history
  • Loading branch information
Melkiades committed Oct 3, 2023
1 parent 584c7b0 commit 73b3a03
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 24 deletions.
18 changes: 4 additions & 14 deletions tests/testthat/_snaps/summarize_glm_count.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,6 @@
Intervals are back-transformed from the log scale

---

Code
res
Output
rate asymp.LCL asymp.UCL ARM
A: Drug X 3.07 2.836527 3.32269 A: Drug X
B: Placebo 3.07 2.836527 3.32269 B: Placebo
C: Combination 3.07 2.836527 3.32269 C: Combination

# s_glm_count works with healthy input

Code
Expand All @@ -148,12 +138,12 @@
[1] 73
$rate
[1] 3.486005
[1] 14.11838
attr(,"label")
[1] "Adjusted Rate"
$rate_ci
[1] 3.047667 3.987387
[1] 11.81189 16.87525
attr(,"label")
[1] "95% CI"
Expand Down Expand Up @@ -182,12 +172,12 @@
[1] 73
$rate
[1] 3.486005
[1] 14.11838
attr(,"label")
[1] "Adjusted Rate"
$rate_ci
[1] 3.047667 3.987387
[1] 11.81189 16.87525
attr(,"label")
[1] "95% CI"
Expand Down
15 changes: 7 additions & 8 deletions tests/testthat/test-summarize_glm_count.R
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,14 @@ testthat::test_that("h_ppmeans works with healthy input", {
testthat::expect_snapshot(fits2)

# XXX ppmeans fails snapshot diff in integration tests
result <- h_ppmeans(
obj = fits$glm_fit,
.df_row = anl,
arm = "ARM",
conf_level = 0.95
testthat::expect_silent(
result <- h_ppmeans(
obj = fits$glm_fit,
.df_row = anl,
arm = "ARM",
conf_level = 0.95
) # diff
)

res <- testthat::expect_silent(result)
testthat::expect_snapshot(res) # diff
})

testthat::test_that("s_glm_count works with healthy input", {
Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-utils_default_stats_formats_labels.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ testthat::test_that("get_formats_from_stats works as expected", {
res <- testthat::expect_silent(get_formats_from_stats(sts))
testthat::expect_equal(names(res), sts)
testthat::expect_equal(res[[1]], "xx.")
testthat::expect_equal(res[[2]], format_count_fraction_fixed_dp)
testthat::expect_equal(res[[3]], format_fraction_fixed_dp)

testthat::expect_null(get_formats_from_stats(c("nothing", "n"))[["nothing"]])

Expand Down

0 comments on commit 73b3a03

Please sign in to comment.