tests/testthat/test_methodsfile.R

test_that("retreive database", {
    testthat::skip_on_cran()
    .reset_samples_db()
    # locate inst folder
    x <- system.file("cmpds.yaml", package = "PKbioanalysis")  |> 
        .parse_cmpds()  |> suppressWarnings()
    .save_cmpd_db(x)
    .get_methodsdb() |> expect_no_error()
    .get_method_cmpds(1)$compound |> 
        expect_equal(x$compounds$compound)

    # repeat the call on same transitons is not allowed.
    .save_cmpd_db(x) |> expect_error()
})

Try the PKbioanalysis package in your browser

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

PKbioanalysis documentation built on June 8, 2025, 10:17 a.m.