Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer skip_if_not() to skip_if(!) #1762

Merged
merged 2 commits into from
Nov 27, 2024
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
4 changes: 2 additions & 2 deletions tests/testthat/test-c-api.R
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ test_that("client library passes tests", {
return("Disabled")

# Avoid installing into system library by default
skip_if(!nzchar(Sys.getenv("RLANG_FULL_TESTS")))
skip_if_not(nzchar(Sys.getenv("RLANG_FULL_TESTS")))

skip_on_cran()
skip_on_ci()
Expand Down Expand Up @@ -1109,7 +1109,7 @@ test_that("can push to dynamic list-of", {
})

test_that("internal error is thrown with OOB dyn-lof access", {
skip_if(!compiled_by_gcc())
skip_if_not(compiled_by_gcc())
lof <- new_dyn_list_of("integer", 3, 2)
expect_snapshot({
err(lof_arr_push_back(lof, 0, 42L), "Location 0 does not exist")
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-cnd-abort.R
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ test_that("generic call is picked up in methods", {
test_that("errors are fully displayed (parents, calls) in knitted files", {
skip_if_not_installed("knitr")
skip_if_not_installed("rmarkdown")
skip_if(!rmarkdown::pandoc_available())
skip_if_not(rmarkdown::pandoc_available())

expect_snapshot({
writeLines(render_md("test-parent-errors.Rmd"))
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-cnd-entrace.R
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ test_that("can call `global_entrace()` in knitted documents", {
)
skip_if_not_installed("knitr")
skip_if_not_installed("rmarkdown")
skip_if(!rmarkdown::pandoc_available())
skip_if_not(rmarkdown::pandoc_available())

entrace_lines <- render_md("test-entrace.Rmd", env = current_env())

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-trace.R
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ test_that("fails when `bottom` is not on the stack", {
test_that("caught error does not display backtrace in knitted files", {
skip_if_not_installed("knitr")
skip_if_not_installed("rmarkdown")
skip_if(!rmarkdown::pandoc_available())
skip_if_not(rmarkdown::pandoc_available())

local_options(
rlang_backtrace_on_error = NULL,
Expand Down
Loading