Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/testthat/test-parallel-outside.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
test_that("error outside of test_that()", {
skip_on_covr()
withr::local_envvar(TESTTHAT_PARALLEL = "TRUE")
err <- tryCatch(
capture.output(suppressMessages(testthat::test_local(
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-parallel-teardown.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
test_that("teardown error", {
skip("teardown errors are ignored")
skip_on_covr()
withr::local_envvar(TESTTHAT_PARALLEL = "TRUE")
err <- tryCatch(
capture.output(suppressMessages(testthat::test_local(
Expand Down
6 changes: 6 additions & 0 deletions tests/testthat/test-parallel.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ test_that("good error if bad option", {
})

test_that("ok", {
skip_on_covr()
withr::local_envvar(c(TESTTHAT_PARALLEL = "TRUE"))
# we cannot run these with the silent reporter, because it is not
# parallel compatible, and they'll not run in parallel
Expand All @@ -43,6 +44,7 @@ test_that("ok", {
})

test_that("fail", {
skip_on_covr()
withr::local_envvar(c(TESTTHAT_PARALLEL = "TRUE"))
# we cannot run these with the silent reporter, because it is not
# parallel compatible, and they'll not run in parallel
Expand All @@ -59,6 +61,7 @@ test_that("fail", {
})

test_that("snapshots", {
skip_on_covr()
withr::local_envvar(c(TESTTHAT_PARALLEL = "TRUE"))
tmp <- withr::local_tempdir("testthat-snap-")
file.copy(test_path("test-parallel", "snap"), tmp, recursive = TRUE)
Expand All @@ -81,6 +84,7 @@ test_that("snapshots", {
})

test_that("new snapshots are added", {
skip_on_covr()
withr::local_envvar(c(TESTTHAT_PARALLEL = "TRUE", CI = "false"))
tmp <- withr::local_tempdir("testthat-snap-")
file.copy(test_path("test-parallel", "snap"), tmp, recursive = TRUE)
Expand All @@ -105,6 +109,7 @@ test_that("new snapshots are added", {
})

test_that("snapshots are removed if test file has no snapshots", {
skip_on_covr()
withr::local_envvar(c(TESTTHAT_PARALLEL = "TRUE"))
tmp <- withr::local_tempdir("testthat-snap-")
file.copy(test_path("test-parallel", "snap"), tmp, recursive = TRUE)
Expand Down Expand Up @@ -132,6 +137,7 @@ test_that("snapshots are removed if test file has no snapshots", {
})

test_that("snapshots are removed if test file is removed", {
skip_on_covr()
withr::local_envvar(c(TESTTHAT_PARALLEL = "TRUE"))
withr::defer(unlink(tmp, recursive = TRUE))
dir.create(tmp <- tempfile("testthat-snap-"))
Expand Down
Loading