1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-09 06:51:48 +02:00

(v0.7.0.9013) mo_synonym fix

This commit is contained in:
2019-06-22 14:49:12 +02:00
parent 409397a337
commit c9156c004a
75 changed files with 465 additions and 507 deletions

View File

@ -33,6 +33,7 @@ test_that("as.mo works", {
expect_equal(as.character(as.mo("Escherichia coli")), "B_ESCHR_COL")
expect_equal(as.character(as.mo("Escherichia coli")), "B_ESCHR_COL")
expect_equal(as.character(as.mo(22242416)), "B_ESCHR_COL")
expect_equal(as.character(as.mo("Escherichia species")), "B_ESCHR")
expect_equal(as.character(as.mo("Escherichia")), "B_ESCHR")
expect_equal(as.character(as.mo("Esch spp.")), "B_ESCHR")

View File

@ -38,10 +38,12 @@ test_that("mo_property works", {
expect_equal(names(mo_taxonomy("Escherichia coli")), c("kingdom", "phylum", "class", "order",
"family", "genus", "species", "subspecies"))
expect_equal(mo_synonyms("Escherichia coli"), NULL)
expect_gt(length(mo_synonyms("C. albicans")), 1)
expect_gt(length(mo_synonyms("Candida albicans")), 1)
expect_equal(class(mo_synonyms(c("Candida albicans", "Escherichia coli"))), "list")
expect_equal(names(mo_info("Escherichia coli")), c("kingdom", "phylum", "class", "order",
"family", "genus", "species", "subspecies",
"synonyms", "url", "ref"))
expect_equal(class(mo_info(c("Escherichia coli", "Staphylococcus aureus"))), "list")
expect_equal(mo_ref("Escherichia coli"), "Castellani et al., 1919")
expect_equal(mo_authors("Escherichia coli"), "Castellani et al.")