-
Notifications
You must be signed in to change notification settings - Fork 303
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* `usethis::use_testthat(3)` * update `tolerance` * transition from `expect_error()` * transition from `expect_warning()` * transition from `expect_message()` * remove calls to `context()` * add missing `Collate` fields
- Loading branch information
1 parent
3d89d8f
commit d4fc1d1
Showing
120 changed files
with
591 additions
and
388 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# This file is part of the standard setup for testthat. | ||
# It is recommended that you do not modify it. | ||
# | ||
# Where should you do additional test configuration? | ||
# Learn more about the roles of various files in: | ||
# * https://r-pkgs.org/testing-design.html#sec-tests-files-overview | ||
# * https://testthat.r-lib.org/articles/special-files.html | ||
|
||
library(testthat) | ||
library(broom) | ||
|
||
test_check("broom") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# augment.drc | ||
|
||
Code | ||
augment(mod) | ||
Condition | ||
Error: | ||
! Must specify either `data` or `newdata` argument. | ||
|
||
--- | ||
|
||
Code | ||
augment(mod2) | ||
Condition | ||
Error: | ||
! Must specify either `data` or `newdata` argument. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# tidy.ergm | ||
|
||
Code | ||
tde <- tidy(gest, conf.int = TRUE, exponentiate = TRUE) | ||
Condition | ||
Warning in `tidy.ergm()`: | ||
Exponentiating but model didn't use log or logit link. | ||
|
||
--- | ||
|
||
Code | ||
td2 <- tidy(gest2, conf.int = TRUE, exponentiate = TRUE) | ||
Condition | ||
Warning in `tidy.ergm()`: | ||
Exponentiating but model didn't use log or logit link. | ||
|
||
# glance.ergm | ||
|
||
Code | ||
gl3 <- glance(gest, deviance = TRUE, mcmc = TRUE) | ||
Message | ||
Though `glance` was supplied `mcmc = TRUE`, the model was not fittedusing MCMC, so the corresponding columns will be omitted. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# all other fixest estimators run | ||
|
||
Code | ||
augment(res_fenegbin, df) | ||
Condition | ||
Error in `augment.fixest()`: | ||
! augment is only supported for fixest models estimated with feols, feglm, or femlm | ||
(supplied model used fenegbin) | ||
|
||
--- | ||
|
||
Code | ||
augment(res_feNmlm, df) | ||
Condition | ||
Error in `augment.fixest()`: | ||
! augment is only supported for fixest models estimated with feols, feglm, or femlm | ||
(supplied model used feNmlm) | ||
|
||
--- | ||
|
||
Code | ||
augment(res_fepois, df) | ||
Condition | ||
Error in `augment.fixest()`: | ||
! augment is only supported for fixest models estimated with feols, feglm, or femlm | ||
(supplied model used fepois) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# tidy.geeglm | ||
|
||
Code | ||
td2 <- tidy(fit, conf.int = FALSE, exponentiate = TRUE) | ||
Condition | ||
Warning in `tidy.geeglm()`: | ||
Exponentiating coefficients, but model did not use a log or logit link function | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# tidy.mjoint | ||
|
||
Code | ||
tidy(mjoint_fit, boot_se = "cat") | ||
Condition | ||
Error: | ||
! `boot_se` argument must be a `bootSE` object. | ||
|
||
# augment.mjoint | ||
|
||
Code | ||
augment(mjoint_fit, data = NULL) | ||
Condition | ||
Error: | ||
! `data` argument is NULL. Try specifying `data` manually. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# tidy.felm | ||
|
||
Code | ||
.res <- tidy(fit, robust = TRUE) | ||
Condition | ||
Warning in `tidy.felm()`: | ||
The "robust" argument has been deprecated in tidy.felm and will be ignored. Please use the "se.type" argument instead. | ||
|
||
# glance.felm | ||
|
||
Code | ||
glance(fit_multi) | ||
Condition | ||
Error: | ||
! Glance does not support linear models with multiple responses. | ||
|
||
# augment.felm | ||
|
||
Code | ||
augment(fit_multi) | ||
Condition | ||
Error: | ||
! Augment does not support linear models with multiple responses. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# tidy_xyz | ||
|
||
Code | ||
tidy(b) | ||
Condition | ||
Error: | ||
! To tidy an xyz list, the length of element `x` must equal the number the number of rows of element `z`, and the length of element `y` must equal the number of columns of element `z`. | ||
|
||
--- | ||
|
||
Code | ||
tidy(c) | ||
Condition | ||
Error: | ||
! To tidy an xyz list, the length of element `x` must equal the number the number of rows of element `z`, and the length of element `y` must equal the number of columns of element `z`. | ||
|
||
--- | ||
|
||
Code | ||
tidy(d) | ||
Condition | ||
Error: | ||
! To tidy an xyz list, `z` must be a matrix. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# not all lists can be tidied | ||
|
||
Code | ||
tidy(nl) | ||
Condition | ||
Error: | ||
! No tidy method recognized for this list. | ||
|
||
--- | ||
|
||
Code | ||
glance(nl) | ||
Condition | ||
Error: | ||
! No glance method recognized for this list. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# augment.Mclust | ||
|
||
Code | ||
augment(fit, 1:10) | ||
Condition | ||
Error: | ||
! `data` must be a data frame or matrix. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
# tidy.default | ||
|
||
Code | ||
td <- tidy(raw(1)) | ||
Condition | ||
Error: | ||
! No tidy method for objects of class raw | ||
|
||
--- | ||
|
||
Code | ||
glance(x) | ||
Condition | ||
Error: | ||
! No glance method for objects of class foo | ||
|
||
--- | ||
|
||
Code | ||
glance(x) | ||
Condition | ||
Error: | ||
! No glance method for objects of class foo | ||
|
||
# glance.default | ||
|
||
Code | ||
glance(TRUE) | ||
Condition | ||
Error: | ||
! No glance method for objects of class logical | ||
|
||
--- | ||
|
||
Code | ||
glance(1) | ||
Condition | ||
Error: | ||
! No glance method for objects of class numeric | ||
|
||
--- | ||
|
||
Code | ||
glance(1L) | ||
Condition | ||
Error: | ||
! No glance method for objects of class integer | ||
|
||
--- | ||
|
||
Code | ||
glance("a") | ||
Condition | ||
Error: | ||
! No glance method for objects of class character | ||
|
||
--- | ||
|
||
Code | ||
glance(x) | ||
Condition | ||
Error: | ||
! No glance method for objects of class foo | ||
|
||
--- | ||
|
||
Code | ||
glance(x) | ||
Condition | ||
Error: | ||
! No glance method for objects of class foo | ||
|
||
# augment.default | ||
|
||
Code | ||
augment(TRUE) | ||
Condition | ||
Error: | ||
! No augment method for objects of class logical | ||
|
||
--- | ||
|
||
Code | ||
augment(1) | ||
Condition | ||
Error: | ||
! No augment method for objects of class numeric | ||
|
||
--- | ||
|
||
Code | ||
augment(1L) | ||
Condition | ||
Error: | ||
! No augment method for objects of class integer | ||
|
||
--- | ||
|
||
Code | ||
augment("a") | ||
Condition | ||
Error: | ||
! No augment method for objects of class character | ||
|
||
--- | ||
|
||
Code | ||
augment(x) | ||
Condition | ||
Error: | ||
! No augment method for objects of class foo | ||
|
||
--- | ||
|
||
Code | ||
augment(x) | ||
Condition | ||
Error: | ||
! No augment method for objects of class foo | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# glance.rqs | ||
|
||
Code | ||
glance(fit) | ||
Condition | ||
Error: | ||
! `glance` cannot handle objects of class 'rqs', i.e. models with more than one tau value. Please use a purrr `map`-based workflow with 'rq' models instead. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# augment.speedglm errors | ||
|
||
Code | ||
augment(fit) | ||
Condition | ||
Error: | ||
! No augment method for objects of class speedglm | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# augment.speedlm | ||
|
||
Code | ||
augment(fit3) | ||
Condition | ||
Error: | ||
! Must specify `data` argument or refit speedglm with `fitted = TRUE`. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# tidy.anova | ||
|
||
Code | ||
.res <- tidy(loess_anova) | ||
Condition | ||
Warning in `tidy.anova()`: | ||
The following column names in ANOVA output were not recognized or transformed: ENP | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# augment.factanal works | ||
|
||
Code | ||
augment(fit_none) | ||
Condition | ||
Error: | ||
! Cannot augment factanal objects fit with `scores = 'none'`. | ||
|
Oops, something went wrong.