Skip to content

Commit

Permalink
Enable parallel testing (#1412)
Browse files Browse the repository at this point in the history
For me, this takes run time down from ~30s to ~11s.
  • Loading branch information
hadley authored Nov 22, 2023
1 parent 388a6ee commit 4b4cf23
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ VignetteBuilder:
knitr
Config/Needs/website: tidyverse/tidytemplate
Config/testthat/edition: 3
Config/testthat/parallel: TRUE
Encoding: UTF-8
Language: en-gb
Roxygen: {library(tidyr); list(markdown = TRUE)}
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-verb-filter.R
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ test_that("filter isn't inlined after mutate with window function #1135", {
# .by -------------------------------------------------------------------------

test_that("can group transiently using `.by`", {
suppressWarnings(check_na_rm(FALSE))
df <- memdb_frame(g = c(1, 1, 2, 1, 2), x = c(5, 10, 1, 2, 3))

out <- filter(df, x > mean(x), .by = g) %>%
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-verb-group_by.R
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ test_that("group_by mutate is not optimised away", {
# sql_build ---------------------------------------------------------------

test_that("ungroup drops PARTITION BY", {
suppressWarnings(check_na_rm(FALSE))

out <- lazy_frame(x = 1) %>%
group_by(x) %>%
ungroup() %>%
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-verb-mutate.R
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ test_that("empty mutate returns input", {
# .by -------------------------------------------------------------------------

test_that("can group transiently using `.by`", {
suppressWarnings(check_na_rm(FALSE))
df <- memdb_frame(g = c(1, 1, 2, 1, 2), x = c(5, 2, 1, 2, 3))

out <- mutate(df, x = mean(x), .by = g) %>%
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-verb-pivot-wider.R
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ test_that("known bug - building a wider spec with a zero row data frame loses `v
# non-unique keys ---------------------------------------------------------

test_that("values_fn can be a single function", {
suppressWarnings(check_na_rm(FALSE))
df <- lazy_frame(a = c(1, 1, 2), key = c("x", "x", "x"), val = c(1, 10, 100))

expect_snapshot(
Expand Down

0 comments on commit 4b4cf23

Please sign in to comment.