Skip to content

Commit

Permalink
fix test for old R versions
Browse files Browse the repository at this point in the history
  • Loading branch information
eutwt committed Dec 2, 2023
1 parent 6b3e48d commit 0ed89c4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/testthat/test-step-subset-summarise.R
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ test_that("can change group vars", {

test_that("data.frame()-ish calls get spliced", {

df <- lazy_dt(data.frame(a = 'a'))
df <- lazy_dt(data.frame(a = 0))

one_dot <- df %>%
summarise(tibble::as_tibble_row(c(x = 1, y = 2)))
Expand All @@ -163,21 +163,21 @@ test_that("data.frame()-ish calls get spliced", {

test_that("data.frame()-ish calls get spliced - with grouped input", {

df <- lazy_dt(data.frame(a = 'a')) %>%
df <- lazy_dt(data.frame(a = 0)) %>%
group_by(a)

one_dot <- df %>%
summarise(tibble::as_tibble_row(c(x = 1, y = 2)))
expect_identical(
collect(one_dot),
tibble(a = 'a', x = 1, y = 2)
tibble(a = 0, x = 1, y = 2)
)

two_dots <- df %>%
summarise(tibble::as_tibble_row(c(x = 1, y = 2)), z = 3)
expect_identical(
collect(two_dots),
tibble(a = 'a', x = 1, y = 2, z = 3)
tibble(a = 0, x = 1, y = 2, z = 3)
)

})
Expand Down

0 comments on commit 0ed89c4

Please sign in to comment.