1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-09 06:51:48 +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

@ -44,7 +44,6 @@ test_that("mdro works", {
# check class
expect_equal(class(outcome), c("ordered", "factor"))
library(dplyr)
# example_isolates should have these finding using Dutch guidelines
expect_equal(as.double(table(outcome)),
c(1970, 24, 6)) # 1970 neg, 24 unconfirmed, 6 pos
@ -245,8 +244,8 @@ test_that("mdro works", {
info = FALSE))
# print groups
library(dplyr)
expect_output(x <- mdro(example_isolates %>% group_by(hospital_id), info = TRUE))
expect_output(x <- mdro(example_isolates %>% group_by(hospital_id), guideline = custom, info = TRUE))
if (require("dplyr")) {
expect_output(x <- mdro(example_isolates %>% group_by(hospital_id), info = TRUE))
expect_output(x <- mdro(example_isolates %>% group_by(hospital_id), guideline = custom, info = TRUE))
}
})