Skip to content

Commit

Permalink
require to requireNamespace
Browse files Browse the repository at this point in the history
  • Loading branch information
pawelru committed Jan 25, 2024
1 parent 80d80a8 commit 46da61a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/testthat/setup-options.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ opts_partial_match_new <- list(
warnPartialMatchAttr = TRUE
)

if (isFALSE(getFromNamespace("on_cran", "testthat")()) && require("withr")) {
if (isFALSE(getFromNamespace("on_cran", "testthat")()) && requireNamespace("withr", quietly = TRUE)) {
withr::local_options(
opts_partial_match_new,
.local_envir = testthat::teardown_env()
Expand Down

0 comments on commit 46da61a

Please sign in to comment.