From ea62edd6231eaa988af3602d169b91c92b9b16b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Wed, 24 Apr 2024 18:07:34 +0200 Subject: [PATCH 1/3] fix: use testthat::skip instead of stop --- tests/testthat/test-examples.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/testthat/test-examples.R b/tests/testthat/test-examples.R index 668f51da0..7acbd0a6d 100644 --- a/tests/testthat/test-examples.R +++ b/tests/testthat/test-examples.R @@ -3,15 +3,15 @@ # this also requires `devtools::document()` to be run before running the tests rd_files <- function() { - man_path <- if (testthat::is_checking()) { + man_path <- if (testthat::is_checking() && identical(Sys.getenv("R_COVR"), "true")) { + testthat::test_path("man") + } else if (testthat::is_checking()) { testthat::test_path("..", "..", "00_pkg_src", testthat::testing_package(), "man") } else { testthat::test_path("..", "..", "man") } - if (!dir.exists(man_path)) { - stop("Cannot find path to `man` directory.") - } + testthat::skip_if_not(dir.exists(man_path), "Cannot find path to `man` directory.") list.files( man_path, From 8e1adb4452f41748b9d5f1e1c7533ddcbe9f4fc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Wed, 24 Apr 2024 18:09:09 +0200 Subject: [PATCH 2/3] fix: remove man symlink --- tests/testthat/man | 1 - 1 file changed, 1 deletion(-) delete mode 120000 tests/testthat/man diff --git a/tests/testthat/man b/tests/testthat/man deleted file mode 120000 index ee201c193..000000000 --- a/tests/testthat/man +++ /dev/null @@ -1 +0,0 @@ -../../man \ No newline at end of file From 8c3b1a7cb91526d7e90b69b5661bf5332b4c8445 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Wed, 24 Apr 2024 18:09:50 +0200 Subject: [PATCH 3/3] fix: re-add man symlink --- tests/testthat/man | 1 + 1 file changed, 1 insertion(+) create mode 120000 tests/testthat/man diff --git a/tests/testthat/man b/tests/testthat/man new file mode 120000 index 000000000..ee201c193 --- /dev/null +++ b/tests/testthat/man @@ -0,0 +1 @@ +../../man \ No newline at end of file