Skip to content

Commit e6cd72f

Browse files
Merge pull request #997 from tidymodels/quiet-testing
2 parents 40ec24f + b4f6db9 commit e6cd72f

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

R/engines.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ load_libs <- function(x, quiet, attach = FALSE) {
4141
if (!attach) {
4242
suppressPackageStartupMessages(requireNamespace(pkg, quietly = quiet))
4343
} else {
44-
library(pkg, character.only = TRUE)
44+
library(pkg, character.only = TRUE, quietly = quiet)
4545
}
4646
}
4747
invisible(x)

tests/testthat/test_grouped_glm.R

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
library(tidyr)
2-
31
test_that('correct results for glm_grouped()', {
42
ucb_weighted <- as.data.frame(UCBAdmissions)
53
ucb_weighted$Freq <- as.integer(ucb_weighted$Freq)
64

7-
ucb_long <- uncount(ucb_weighted, Freq)
5+
ucb_long <- tidyr::uncount(ucb_weighted, Freq)
86

97
ungrouped <- glm(Admit ~ Gender + Dept, data = ucb_long, family = binomial)
108

119
expect_error(
1210
grouped <- glm_grouped(Admit ~ Gender + Dept, data = ucb_weighted, weights = ucb_weighted$Freq),
1311
regexp = NA
1412
)
15-
expect_equal(grouped$df.null, 11)
1613

14+
expect_equal(grouped$df.null, 11)
1715
})

0 commit comments

Comments
 (0)