Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Tests for Bio::Taxonomy::get_tree

  • Loading branch information...
commit 106ac10d436f93c17d61be4cdb5cd9b2ea8843a1 1 parent 960f306
@fangly fangly authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 t/RemoteDB/Taxonomy.t
View
9 t/RemoteDB/Taxonomy.t
@@ -7,7 +7,7 @@ BEGIN {
use lib '.';
use Bio::Root::Test;
- test_begin(-tests => 144,
+ test_begin(-tests => 146,
-requires_module => 'XML::Twig');
use_ok('Bio::DB::Taxonomy');
@@ -164,6 +164,11 @@ ok $db_list = Bio::DB::Taxonomy->new(
);
is $db_list->get_num_taxa, 4;
+# Make a tree
+my $tree = $db_list->get_tree('Homo');
+isa_ok $tree, 'Bio::Tree::TreeI';
+is $tree->number_nodes, 3;
+
ok my $h_list = $db_list->get_taxon(-name => 'Homo sapiens');
ok my $h_flat = $db_flatfile->get_taxon(-name => 'Homo sapiens');
@@ -189,7 +194,7 @@ $h_list->db_handle($db_list);
my $ancestors_ancestor = $h_list->ancestor->ancestor;
is $ancestors_ancestor->scientific_name, 'Mammalia';
-my $tree = Bio::Tree::Tree->new(-node => $h_list);
+$tree = Bio::Tree::Tree->new(-node => $h_list);
$h_list->db_handle($db_flatfile);
$ancestors_ancestor = $h_list->ancestor->ancestor;
is $ancestors_ancestor->scientific_name, 'Mammalia';
Please sign in to comment.
Something went wrong with that request. Please try again.