Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Aug 27, 2024
1 parent db57cb6 commit c700a3b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/testthat/test-data_modify.R
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,10 @@ test_that("data_modify errors for non df", {
test_that("data_modify errors for empty data frames", {
data(mtcars)
x <- mtcars[1, ]
expect_error(data_modify(x[-1, ], new_var = 5), regex = "`data_modify()` only works")
expect_error(
data_modify(x[-1, ], new_var = 5),
regex = "only works"
)
})


Expand Down Expand Up @@ -582,7 +585,7 @@ withr::with_environment(
x <- data_group(mtcars, "gear")

foo <- function(d) {
out <- data_modify(d, Trials = 1:n())
out <- data_modify(d, Trials = 1:n()) # nolint
out$Trials
}
expect_identical(
Expand Down

0 comments on commit c700a3b

Please sign in to comment.