From 1f6ff3f6e0a3c39eb4b8094477f982313b6e26fa Mon Sep 17 00:00:00 2001 From: Pawel Rucki <12943682+pawelru@users.noreply.github.com> Date: Thu, 25 Jan 2024 13:17:44 +0100 Subject: [PATCH] require to requireNamespace --- tests/testthat/setup-options.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testthat/setup-options.R b/tests/testthat/setup-options.R index bea4d39e8..6c644735b 100644 --- a/tests/testthat/setup-options.R +++ b/tests/testthat/setup-options.R @@ -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()