Skip to content

Commit 348db73

Browse files
hadleyhriebl
authored andcommitted
Fix for dev waldo
waldo now checks that ignore_attr is either TRUE, FALSE, or a character vector, so I made the minimal changes to your code to make this true.
1 parent 70f681d commit 348db73

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

R/testthat-helpers.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
all_attr_but_dim <- function(object, expected) {
2-
ignore_attr <- names(attributes(object))
2+
ignore_attr <- as.character(names(attributes(object)))
33
ignore_attr <- c(ignore_attr, names(attributes(expected)))
44
ignore_attr[ignore_attr != "dim"]
55
}
@@ -38,6 +38,8 @@ expect_roughly <- function(object,
3838
expected.label = NULL) {
3939
if (is.null(ignore_attr)) {
4040
ignore_attr <- all_attr_but_dim(object, expected)
41+
} else {
42+
ignore_attr <- FALSE
4143
}
4244

4345
testthat::expect_equal(

0 commit comments

Comments
 (0)