(v3.1.0.9014) Fix the CI: replace a test unsupported by tinytest, run R 3.0 on Ubuntu 24.04, and use Python 3.12 for the PyPI package, since ubuntu-latest moved to Ubuntu 26.04

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2026-10-30 14:55:00 +01:00
1 parent 7f3c75ece7
commit 08fd165a60
5 files changed
+16 -5

No files matched your search

+10 -1
View File
@@ -75,7 +75,16 @@ test_that("test-antibiogram.R", {
expect_false("B_BRCLL_MLTN" %in% retrieve_wisca_parameters(wisca_with)$mo)
# warning for a large prior weight of rare pathogens
expect_warning(wisca(wisca_data, antimicrobials = "MEM", syndromic_group = "grp", simulations = 100, info = FALSE), "prior weight")
expect_warning(wisca(example_isolates, antimicrobials = "MEM", simulations = 100, info = FALSE), NA)
# (expect_warning(..., NA) is not supported by tinytest)
wisca_warnings <- character(0)
withCallingHandlers(
wisca(example_isolates, antimicrobials = "MEM", simulations = 100, info = FALSE),
warning = function(w) {
wisca_warnings <<- c(wisca_warnings, conditionMessage(w))
invokeRestart("muffleWarning")
}
)
expect_false(any(grepl("prior weight", wisca_warnings)))
if (AMR:::pkg_is_available("dplyr", min_version = "1.0.0", also_load = TRUE)) {
ab_grouped <- tryCatch(
# pathogen names are translated, so test in English, which must also hold on systems in another language