Sync'ed RichSeqI with the implementation. RichSeq provides backward
[bioperl-live.git] / t / Taxonomy.t
blob5eb51ef61e610a5dca3246610f6aea64a70ea76d
1 # This is -*-Perl-*- code
2 # $Id$
3 use strict;
5 BEGIN { 
6     eval { require Test; };
7     if( $@ ) { 
8         use lib 't';
9     }
10     use Test;
11     plan tests => 8;
14 use Bio::DB::Taxonomy;
16 my $db = new Bio::DB::Taxonomy(-source => 'entrez');
18 ok($db);
21 my ($taxaid) = $db->get_taxaid('homo sapiens');
22 ok($taxaid, 9606);
24 my $n = $db->get_Taxonomy_Node($taxaid);
25 ok($n);
26 unless( $n ) {
27     for ( 1..4 ) { skip(1,'no species object could be created') }
28 } else {
29     ok($n->species, 'sapiens');
30     ok($n->common_name, 'human');
31     ok($n->ncbi_taxid, 9606);
32     ok($n->division, 'mammals');
34 sleep(3);
35 my $yeastid = $db->get_taxaid('Saccharomyces cerevisiae');
36 ok($yeastid, 4932);