mirror of
https://github.com/msberends/AMR.git
synced 2025-07-10 01:02:47 +02:00
(v1.6.0.9030) new unit test flow
This commit is contained in:
@ -119,7 +119,7 @@ test_that("mdro works", {
|
||||
pza = sample_rsi(),
|
||||
MFX = sample_rsi(),
|
||||
KAN = sample_rsi())
|
||||
expect_gt(n_distinct(mdr_tb(x)), 2)
|
||||
expect_gt(length(unique(mdr_tb(x))), 2)
|
||||
|
||||
# check the guideline by Magiorakos et al. (2012), the default guideline
|
||||
stau <- data.frame(mo = c("S. aureus", "S. aureus", "S. aureus", "S. aureus"),
|
||||
|
@ -48,10 +48,12 @@ test_that("prediction of rsi works", {
|
||||
info = TRUE)))
|
||||
pdf(NULL) # prevent Rplots.pdf being created
|
||||
expect_silent(plot(x))
|
||||
expect_silent(ggplot_rsi_predict(x))
|
||||
expect_silent(ggplot(x))
|
||||
expect_error(ggplot_rsi_predict(example_isolates))
|
||||
|
||||
if (suppressWarnings(require("ggplot2"))) {
|
||||
expect_silent(ggplot_rsi_predict(x))
|
||||
expect_silent(ggplot(x))
|
||||
expect_error(ggplot_rsi_predict(example_isolates))
|
||||
}
|
||||
|
||||
expect_output(rsi_predict(x = subset(example_isolates, mo == "B_ESCHR_COLI"),
|
||||
model = "binomial",
|
||||
col_ab = "AMX",
|
||||
|
Reference in New Issue
Block a user