(v3.0.1.9117) Fix static test in test-zzz.R to run without testthat (R 3.0/4.0 tinytest)

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2026-10-11 22:15:43 +02:00
1 parent 53d0704271
commit 10053d582e
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -1,5 +1,5 @@
Package: AMR Package: AMR
Version: 3.0.1.9116 Version: 3.0.1.9117
Date: 2026-10-11 Date: 2026-10-11
Title: Antimicrobial Resistance Data Analysis Title: Antimicrobial Resistance Data Analysis
Description: Functions to simplify and standardise antimicrobial resistance (AMR) Description: Functions to simplify and standardise antimicrobial resistance (AMR)
+1 -1
View File
@@ -1,4 +1,4 @@
# AMR 3.0.1.9116 # AMR 3.0.1.9117
Planned as v3.1.0, mid October 2026. Planned as v3.1.0, mid October 2026.
+1 -1
View File
@@ -224,7 +224,7 @@ test_that("test-zzz.R", {
test_that("test-zzz.R: no installation-time dependency on suggested packages", { test_that("test-zzz.R: no installation-time dependency on suggested packages", {
skip_on_cran() skip_on_cran()
# code outside functions runs when the package is installed, not when it is loaded: anything it takes from a suggested package is then decided by the machine that built the package (e.g., the CRAN binary builders, which have all suggested packages), and fails for users who do not have that package, see .onLoad() in R/zzz.R # code outside functions runs when the package is installed, not when it is loaded: anything it takes from a suggested package is then decided by the machine that built the package (e.g., the CRAN binary builders, which have all suggested packages), and fails for users who do not have that package, see .onLoad() in R/zzz.R
r_dir <- file.path(testthat::test_path(), "..", "..", "R") r_dir <- file.path("..", "..", "R")
skip_if(!dir.exists(r_dir), "R source files not available") skip_if(!dir.exists(r_dir), "R source files not available")
suggests <- trimws(gsub("[(].*", "", strsplit(read.dcf(file.path(r_dir, "..", "DESCRIPTION"), fields = "Suggests")[1, 1], ",")[[1]])) suggests <- trimws(gsub("[(].*", "", strsplit(read.dcf(file.path(r_dir, "..", "DESCRIPTION"), fields = "Suggests")[1, 1], ",")[[1]]))
runtime_calls <- c("import_fn", "requireNamespace", "loadNamespace", "pkg_is_available", "l10n_info", "require", "library") runtime_calls <- c("import_fn", "requireNamespace", "loadNamespace", "pkg_is_available", "l10n_info", "require", "library")