Skip to content

Commit

Permalink
add test for similarnames
Browse files Browse the repository at this point in the history
  • Loading branch information
banhbio committed Dec 21, 2022
1 parent c790676 commit 5ef14ab
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ db = Taxonomy.DB("db/nodes.dmp", "db/names.dmp")

@test @inferred(Nothing, get(db, 9606, nothing)) == human
@test @inferred(name2taxids("Homo", db)) == [9605]
@test @inferred(name2taxids("Homo")) == [9605]

similar = first(similarnames("Homo sapiens"))
@test similar.taxid == 9606
@test similar.name == "Homo sapiens"
@test similar.similarity == 1.0

@test @inferred(Nothing, AbstractTrees.parent(human)) == Taxon(9605,db)
@test @inferred(Set(children(human))) == Set([Taxon(63221,db), Taxon(741158, db)])
Expand Down

0 comments on commit 5ef14ab

Please sign in to comment.