From d2b3937a90c26b85eb6dabf13ccc9c2fd82ad364 Mon Sep 17 00:00:00 2001 From: Matthijs Berends Date: Sun, 27 Apr 2025 09:58:19 +0200 Subject: [PATCH] (v2.1.1.9257) adjust unit tests --- DESCRIPTION | 4 ++-- NEWS.md | 2 +- tests/testthat/test-antibiogram.R | 7 +++---- tests/testthat/test-sir.R | 10 ++++------ 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 6194b806b..725712b38 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: AMR -Version: 2.1.1.9256 -Date: 2025-04-26 +Version: 2.1.1.9257 +Date: 2025-04-27 Title: Antimicrobial Resistance Data Analysis Description: Functions to simplify and standardise antimicrobial resistance (AMR) data analysis and to work with microbial and antimicrobial properties by diff --git a/NEWS.md b/NEWS.md index 963b3176c..37c276e3c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# AMR 2.1.1.9256 +# AMR 2.1.1.9257 *(this beta version will eventually become v3.0. We're happy to reach a new major milestone soon, which will be all about the new One Health support! Install this beta using [the instructions here](https://amr-for-r.org/#get-this-package).)* diff --git a/tests/testthat/test-antibiogram.R b/tests/testthat/test-antibiogram.R index 4ffee6202..03cf0b6dd 100644 --- a/tests/testthat/test-antibiogram.R +++ b/tests/testthat/test-antibiogram.R @@ -53,7 +53,7 @@ test_that("test-antibiogram.R", { expect_inherits(ab2, "antibiogram") expect_inherits(ab3, "antibiogram") expect_equal(colnames(ab1), c("Pathogen", "Amikacin", "Gentamicin", "Imipenem", "Kanamycin", "Meropenem", "Tobramycin")) - expect_equal(colnames(ab2), c("Pathogen (N min-max)", "J01GB01", "J01GB03", "J01GB04", "J01GB06")) + expect_equal(colnames(ab2), c("Pathogen", "J01GB01", "J01GB03", "J01GB04", "J01GB06")) expect_equal(colnames(ab3), c("Pathogen", "IPM", "MEM")) expect_equal(ab3$MEM, c(52, NA, 100, 100, NA)) @@ -96,14 +96,13 @@ test_that("test-antibiogram.R", { syndromic_group = ifelse(ex1$ward == "ICU", "IC", "Geen IC" ), - language = "nl", - add_total_n = TRUE + language = "nl" ) expect_inherits(ab6, "antibiogram") expect_inherits(ab7, "antibiogram") expect_equal(colnames(ab6), c("Syndromic Group", "Pathogen", "AMK", "GEN", "IPM", "KAN", "MEM", "TOB")) - expect_equal(colnames(ab7), c("Syndroomgroep", "Pathogeen (N min-max)", "Amikacine", "Gentamicine", "Tobramycine")) + expect_equal(colnames(ab7), c("Syndroomgroep", "Pathogeen", "Amikacine", "Gentamicine", "Tobramycine")) # Weighted-incidence syndromic combination antibiogram (WISCA) --------- diff --git a/tests/testthat/test-sir.R b/tests/testthat/test-sir.R index 054cd938a..227222f95 100644 --- a/tests/testthat/test-sir.R +++ b/tests/testthat/test-sir.R @@ -325,15 +325,13 @@ test_that("test-sir.R", { expect_message(as.sir(data.frame( mo = "E. coli", NIT = c("<= 2", 32), - uti = TRUE, - info = TRUE - ))) + uti = TRUE + ), info = TRUE)) expect_message(as.sir(data.frame( mo = "E. coli", NIT = c("<= 2", 32), - specimen = c("urine", "blood"), - info = TRUE - ))) + specimen = c("urine", "blood") + ), info = TRUE)) # SDD vs I in CLSI 2024 expect_identical(