tests/testthat/test-get_read_str.R

context("Read structure helper")
test_that("Stripping and lower casing is correct", {
    expect_equal(
        get_read_str("celSeq"),
        list(bs1 = -1, bl1 = 0, bs2 = 6, bl2 = 8,  us = 0,  ul = 6)
    )

    expect_equal(
        get_read_str("cel-Seq"),
        list(bs1 = -1, bl1 = 0, bs2 = 6, bl2 = 8,  us = 0,  ul = 6)
    )

    expect_equal(
        get_read_str("CelSeq"),
        list(bs1 = -1, bl1 = 0, bs2 = 6, bl2 = 8,  us = 0,  ul = 6)
    )
})

test_that("Unknown protocols are properly caught", {
    expect_error(get_read_str("FakeSeq"))
    expect_error(get_read_str("errorseq"))
})

Try the scPipe package in your browser

Any scripts or data that you put into this service are public.

scPipe documentation built on Nov. 8, 2020, 8:28 p.m.