Skip to content

Commit

Permalink
Merge pull request #446 from dengzq1234/instance#443
Browse files Browse the repository at this point in the history
update ncbiquery unittest. Fixes #443
  • Loading branch information
jhcepas authored Mar 29, 2020
2 parents f2fc921 + ebd4af2 commit 437efd9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ete3/test/test_ncbiquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,13 @@ def test_ncbiquery(self):
self.assertEqual(set(name2id['Bacteria']), set([2]))

out = ncbi.get_descendant_taxa("9605", intermediate_nodes=True)
#Out[9]: [1425170, 741158, 63221, 9606]
self.assertEqual(set(out), set([1425170, 741158, 63221, 9606]))
#Out[9]: [9606, 63221, 741158, 2665952, 2665953, 1425170]
# New Taxonomies of Homo in NCBI, {2665952: 'environmental samples', 2665953: 'Homo sapiens environmental sample'}
self.assertEqual(set(out), set([9606, 63221, 741158, 2665952, 2665953, 1425170]))

out = ncbi.get_descendant_taxa("9605", intermediate_nodes=False)
#Out[10]: [1425170, 741158, 63221]
self.assertEqual(set(out), set([1425170, 741158, 63221]))
#Out[10]: [63221, 741158, 2665953, 1425170]
self.assertEqual(set(out), set([63221, 741158, 2665953, 1425170]))

out = ncbi.get_descendant_taxa("9605", intermediate_nodes=False, rank_limit="species")
#Out[11]: [9606, 1425170]
Expand Down

0 comments on commit 437efd9

Please sign in to comment.