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

(v1.0.0.9005) info printing only in interactive mode

This commit is contained in:
2020-02-21 21:13:38 +01:00
parent 47fe8b7820
commit ea32e9916a
28 changed files with 52 additions and 36 deletions

View File

@ -31,5 +31,9 @@ test_that("disk works", {
expect_silent(as.disk(levels(as.disk(15))))
expect_warning(as.disk("INVALID VALUE"))
expect_output(print(as.disk(12)))
library(tibble)
expect_output(print(tibble(d = as.disk(12))))
})

View File

@ -110,9 +110,9 @@ test_that("EUCAST rules work", {
"S")
# also test norf
expect_output(suppressWarnings(eucast_rules(example_isolates %>% mutate(NOR = "S", NAL = "S"))))
expect_output(suppressWarnings(eucast_rules(example_isolates %>% mutate(NOR = "S", NAL = "S"), info = TRUE)))
# check verbose output
expect_output(suppressWarnings(eucast_rules(example_isolates, verbose = TRUE)))
expect_output(suppressWarnings(eucast_rules(example_isolates, verbose = TRUE, info = TRUE)))
})

View File

@ -141,7 +141,8 @@ test_that("first isolates work", {
mutate(first = first_isolate(., "date", "patient_id",
col_mo = "mo",
col_specimen = "specimen",
filter_specimen = "something_unexisting")))
filter_specimen = "something_unexisting",
info = TRUE)))
# printing of exclusion message
expect_message(example_isolates %>%
@ -149,7 +150,8 @@ test_that("first isolates work", {
col_mo = "mo",
col_patient_id = "patient_id",
col_testcode = "gender",
testcodes_exclude = "M"))
testcodes_exclude = "M",
info = TRUE))
# errors
expect_error(first_isolate("date", "patient_id", col_mo = "mo"))