mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 07:51:57 +02:00
(v0.7.1.9072) key_antibiotics() for foreign systems
This commit is contained in:
@ -30,6 +30,8 @@ test_that("data sets are valid", {
|
||||
|
||||
# check cross table reference
|
||||
expect_true(all(microorganisms.codes$mo %in% microorganisms$mo))
|
||||
expect_false(any(is.na(microorganisms.codes$code)))
|
||||
expect_false(any(is.na(microorganisms.codes$mo)))
|
||||
|
||||
# antibiotic names must always be coercible to their original AB code
|
||||
expect_identical(antibiotics$ab, as.ab(antibiotics$name))
|
||||
|
@ -30,4 +30,7 @@ test_that("keyantibiotics work", {
|
||||
expect_false(key_antibiotics_equal("SSS", "SIS", ignore_I = FALSE))
|
||||
expect_true(key_antibiotics_equal(".SS", "SI.", ignore_I = TRUE))
|
||||
expect_false(key_antibiotics_equal(".SS", "SI.", ignore_I = FALSE))
|
||||
|
||||
library(dplyr)
|
||||
expect_warning(key_antibiotics(example_isolates %>% slice(rep(1, 10))))
|
||||
})
|
||||
|
@ -22,7 +22,7 @@
|
||||
context("like.R")
|
||||
|
||||
test_that("`like` works", {
|
||||
expect_true(suppressWarnings("test" %like% c("^t", "^s")))
|
||||
expect_true(sum("test" %like% c("^t", "^s")) == 1)
|
||||
expect_true("test" %like% "test")
|
||||
expect_true("test" %like% "TEST")
|
||||
expect_true(as.factor("test") %like% "TEST")
|
||||
|
Reference in New Issue
Block a user