tests/testthat/test_helper_rhea.R

## function .getRheaIDsFromProteinID
test_that(".getRheaIDsFromProteinID works", {
    
    if (Sys.info()[["sysname"]] != "Darwin") {
        expect_equal(getRheaIDsFromProteinID("Q920L6"),
            c("RHEA:32727", "RHEA:35315", "RHEA:39675", "RHEA:60140", "RHEA:39167",
                "RHEA:36511", "RHEA:36503", "RHEA:36523"))
        expect_equal(getRheaIDsFromProteinID("Q9H5J4"),
             c("RHEA:32727", "RHEA:35315", "RHEA:39675", "RHEA:60140", "RHEA:39167",
               "RHEA:36511", "RHEA:36503", "RHEA:36523"))
    }
    expect_error(getRheaIDsFromProteinID(NULL),
        "Failed to retrieve data from UniProt. Check the UniProt ID and try again.")
    expect_error(getRheaIDsFromProteinID("foo"),
        "Failed to retrieve data from UniProt. Check the UniProt ID and try again.")
})
michaelwitting/wormLipidPredictR documentation built on Jan. 30, 2025, 12:30 a.m.