1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-12 23:41:57 +02:00

(v1.7.1.9049) unit tests

This commit is contained in:
2021-10-05 09:58:08 +02:00
parent d1b16ce641
commit 2bcf28281d
28 changed files with 64 additions and 44 deletions

View File

@ -51,7 +51,7 @@ expect_error(count_susceptible("test", as_percent = "test"))
expect_error(count_df(c("A", "B", "C")))
expect_error(count_df(example_isolates[, "date"]))
if (AMR:::pkg_is_available("dplyr")) {
if (AMR:::pkg_is_available("dplyr", min_version = "1.0.0")) {
expect_equal(example_isolates %>% count_susceptible(AMC), 1433)
expect_equal(example_isolates %>% count_susceptible(AMC, GEN, only_all_tested = TRUE), 1687)
expect_equal(example_isolates %>% count_susceptible(AMC, GEN, only_all_tested = FALSE), 1764)