Skip to content

Commit

Permalink
Attempt to skip invalid reasons for failure
Browse files Browse the repository at this point in the history
  • Loading branch information
remlapmot committed Aug 21, 2024
1 parent d90f277 commit e1cc79f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/testthat/test_variants.r
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ if (inherits(o2, c("try-error", "response"))) skip("Server issues")

test_that("genes",
{
if (!inherits(o1, c("tbl_df", "tbl", "data.frame"))) skip("o1 of wrong class")
if (!inherits(o2, c("tbl_df", "tbl", "data.frame"))) skip("o2 of wrong class")
if (nrow(o1) == 0) skip("o1 has 0 rows")
if (nrow(o2) == 0) skip("o2 has 0 rows")
expect_gt(nrow(o1), 0)
expect_gt(nrow(o2), nrow(o1))
})
Expand Down Expand Up @@ -51,6 +51,7 @@ test_that("conversion",
o <- try(variants_to_rsid(c("rs1205", "7:105561135")))
if (inherits(o, c("try-error", "response"))) skip("Server issues")
if (!inherits(o, "character")) skip("o of wrong class")
if (length(o) == 0) skip("o is of length 0")
expect_true(length(o) == 2)

o <- NULL
Expand Down

0 comments on commit e1cc79f

Please sign in to comment.