1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-12 18:21:49 +02:00

(v1.6.0.9023) new unit test flow

This commit is contained in:
2021-05-13 19:31:47 +02:00
parent 655b813e99
commit aeea00881e
34 changed files with 408 additions and 355 deletions

View File

@ -131,11 +131,12 @@ test_that("mo_property works", {
expect_equal(mo_name("test", reference_df = data.frame(col1 = "test", mo = "B_ESCHR_COLI")),
"Escherichia coli")
library(dplyr)
expect_equal(example_isolates %>% filter(mo_is_gram_negative()) %>% nrow(),
730)
expect_equal(example_isolates %>% filter(mo_is_gram_positive()) %>% nrow(),
1238)
expect_equal(example_isolates %>% filter(mo_is_intrinsic_resistant(ab = "Vancomycin")) %>% nrow(),
710)
if (require("dplyr")) {
expect_equal(example_isolates %>% filter(mo_is_gram_negative()) %>% nrow(),
730)
expect_equal(example_isolates %>% filter(mo_is_gram_positive()) %>% nrow(),
1238)
expect_equal(example_isolates %>% filter(mo_is_intrinsic_resistant(ab = "Vancomycin")) %>% nrow(),
710)
}
})