From 4fcd77c3d0d7fc49807ff0787b3b0433c5ba4c93 Mon Sep 17 00:00:00 2001 From: mpadge Date: Tue, 27 Aug 2024 13:52:44 +0200 Subject: [PATCH] fix tests by ensuring srr skeleton is removed before creating --- DESCRIPTION | 2 +- codemeta.json | 2 +- tests/testthat/test-editor-check.R | 4 ++++ tests/testthat/test-srr.R | 4 ++++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 10b6780..e064e07 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: roreviewapi Title: Plumber API to report package structure and function -Version: 0.1.0.039 +Version: 0.1.0.040 Authors@R: person("Mark", "Padgham", , "mark.padgham@email.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-2172-5265")) diff --git a/codemeta.json b/codemeta.json index fe87d85..e915c41 100644 --- a/codemeta.json +++ b/codemeta.json @@ -8,7 +8,7 @@ "codeRepository": "https://github.com/ropensci-review-tools/roreviewapi", "issueTracker": "https://github.com/ropensci-review-tools/roreviewapi/issues", "license": "https://spdx.org/licenses/GPL-3.0", - "version": "0.1.0.039", + "version": "0.1.0.040", "programmingLanguage": { "@type": "ComputerLanguage", "name": "R", diff --git a/tests/testthat/test-editor-check.R b/tests/testthat/test-editor-check.R index 545a4ee..b2b9323 100644 --- a/tests/testthat/test-editor-check.R +++ b/tests/testthat/test-editor-check.R @@ -3,6 +3,10 @@ test_all <- identical (Sys.getenv ("MPADGE_LOCAL"), "true") || testthat::skip_if (!test_all) test_that ("editor check", { + path <- fs::path (fs::path_temp (), "demo") + if (fs::dir_exists (path)) { + fs::dir_delete (path) + } path <- srr::srr_stats_pkg_skeleton () roxygen2::roxygenise (path) Sys.setenv ("PKGCHECK_CACHE_DIR" = fs::path_temp ()) diff --git a/tests/testthat/test-srr.R b/tests/testthat/test-srr.R index a792ed1..1ea1689 100644 --- a/tests/testthat/test-srr.R +++ b/tests/testthat/test-srr.R @@ -3,6 +3,10 @@ test_all <- identical (Sys.getenv ("MPADGE_LOCAL"), "true") || testthat::skip_if (!test_all) test_that ("srr", { + path <- fs::path (fs::path_temp (), "demo") + if (fs::dir_exists (path)) { + fs::dir_delete (path) + } path <- srr::srr_stats_pkg_skeleton () expect_message (