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

(v1.2.0.9013) unit test fix

This commit is contained in:
2020-06-22 13:18:40 +02:00
parent 779a4e8348
commit 8a66e475d7
14 changed files with 25 additions and 21 deletions

View File

@ -27,7 +27,6 @@ test_that("rsi works", {
expect_true(as.rsi("S") < as.rsi("I"))
expect_true(as.rsi("I") < as.rsi("R"))
expect_true(as.rsi("R") > as.rsi("S"))
expect_true(is.rsi(as.rsi("S")))
# print plots, should not raise errors
@ -40,11 +39,10 @@ test_that("rsi works", {
expect_equal(suppressWarnings(as.logical(as.rsi("INVALID VALUE"))), NA)
expect_equal(summary(as.rsi(c("S", "R"))), c("Class" = "rsi",
"<NA>" = "0",
"Sum S" = "1",
"Sum IR" = "1",
"-Sum R" = "1",
"-Sum I" = "0"))
"%R" = "50% (n=1)",
"%SI" = "50% (n=1)",
"- %S" = "50% (n=1)",
"- %I" = "0% (n=0)"))
expect_identical(as.logical(lapply(example_isolates, is.rsi.eligible)),
rep(FALSE, length(example_isolates)))