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

fix for keyab, more examples

This commit is contained in:
2018-07-23 10:35:39 +02:00
parent ad662d7bab
commit 9920ac8a5c
6 changed files with 50 additions and 18 deletions

View File

@ -1,13 +1,5 @@
context("first_isolates.R")
test_that("keyantibiotics work", {
expect_equal(length(key_antibiotics(septic_patients, info = FALSE)), nrow(septic_patients))
expect_true(key_antibiotics_equal("SSS", "SSS"))
expect_false(key_antibiotics_equal("SSS", "SRS"))
expect_true(key_antibiotics_equal("SSS", "SIS", ignore_I = TRUE))
expect_false(key_antibiotics_equal("SSS", "SIS", ignore_I = FALSE))
})
test_that("first isolates work", {
# septic_patients contains 1959 out of 2000 first isolates
expect_equal(

View File

@ -0,0 +1,11 @@
context("key_antibiotics.R")
test_that("keyantibiotics work", {
expect_equal(length(key_antibiotics(septic_patients, warnings = FALSE)), nrow(septic_patients))
expect_true(key_antibiotics_equal("SSS", "SSS"))
expect_false(key_antibiotics_equal("SSS", "SRS"))
expect_true(key_antibiotics_equal("SSS", "SIS", ignore_I = TRUE))
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))
})