tests/testthat/test-ZINBParams.R

context("ZINBParams")

if (requireNamespace("zinbwave", quietly = TRUE)) {
    params <- newZINBParams()
}

test_that("constructor is valid", {
    skip_if_not_installed("zinbwave")
    expect_true(validObject(params))
})

test_that("printing works", {
    skip_if_not_installed("zinbwave")
    expect_output(show(params), "A Params object of class ZINBParams")
})

test_that("nGenes checks work", {
    skip_if_not_installed("zinbwave")
    expect_error(setParam(params, "nGenes", 1),
                 "nGenes cannot be set directly")
    expect_error(setParam(params, "nCells", 1),
                 "nCells cannot be set directly")
})

Try the splatter package in your browser

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

splatter documentation built on Dec. 3, 2020, 2:01 a.m.