From 4c42a43f7d42617e2b4a49835659825d32f6e57c Mon Sep 17 00:00:00 2001 From: Matthijs Berends Date: Tue, 20 Dec 2022 22:41:39 +0100 Subject: [PATCH] fixes --- DESCRIPTION | 2 +- NEWS.md | 2 +- inst/tinytest/test-first_isolate.R | 8 ++++---- inst/tinytest/test-mo.R | 5 +---- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index d251bc97..52619a0f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: AMR -Version: 1.8.2.9067 +Version: 1.8.2.9068 Date: 2022-12-20 Title: Antimicrobial Resistance Data Analysis Description: Functions to simplify and standardise antimicrobial resistance (AMR) diff --git a/NEWS.md b/NEWS.md index 26ffa4c7..02fa120f 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# AMR 1.8.2.9067 +# AMR 1.8.2.9068 *(this beta version will eventually become v2.0! We're happy to reach a new major milestone soon!)* diff --git a/inst/tinytest/test-first_isolate.R b/inst/tinytest/test-first_isolate.R index 7bcd0f9b..cfe3e2ea 100755 --- a/inst/tinytest/test-first_isolate.R +++ b/inst/tinytest/test-first_isolate.R @@ -67,8 +67,8 @@ expect_equal( # first non-ICU isolates -expect_equal( - sum( +expect_identical( + as.integer(sum( first_isolate(example_isolates, col_mo = "mo", col_date = "date", @@ -78,8 +78,8 @@ expect_equal( icu_exclude = TRUE ), na.rm = TRUE - ), - 942 + )), + 942L ) # set 1500 random observations to be of specimen type 'Urine' diff --git a/inst/tinytest/test-mo.R b/inst/tinytest/test-mo.R index 41085ac4..845bc5af 100644 --- a/inst/tinytest/test-mo.R +++ b/inst/tinytest/test-mo.R @@ -114,7 +114,7 @@ expect_identical( "Paraburkholderia nodosa" )) ), - rep("B_PRBRK_NODS", 4) + rep("B_PRBRK_NODS", 2) ) # empty values @@ -198,9 +198,6 @@ if (AMR:::pkg_is_available("dplyr", min_version = "1.0.0")) { expect_true(example_isolates %>% pull(mo) %>% is.mo()) } -# unknown results -expect_warning(as.mo("INVALID")) - # print expect_stdout(print(as.mo(c("B_ESCHR_COLI", NA))))