1 # -*-Perl-*- Test Harness script for Bioperl
9 test_begin(-tests => 15,
10 -requires_modules => [qw(XML::SAX
18 my $verbose = test_debug();
20 # Using lax parser XML::SAX::PurePerl due to external DTD error (404 for URL,
21 # invalid redeclaration of predefined entity) instead of others such as
22 # XML::LibXML::SAX. See GH#376.
23 local $XML::SAX::ParserPackage = 'XML::SAX::PurePerl';
24 my $str = Bio::SeqIO->new(-format => 'bsml_sax',
26 -file => test_input_file('U83300.bsml'));
27 my $seq = $str->next_seq;
28 isa_ok($seq, 'Bio::Seq::RichSeqI');
29 my @refs = $seq->annotation->get_Annotations('reference');
31 is($seq->display_id,'MIVN83300');
32 is($seq->molecule ,'dna');
33 ok(! $seq->is_circular);
34 is($seq->get_dates,2);
35 is($seq->accession_number, 'U83300');
36 is($seq->seq_version,1);
37 my @feats = $seq->get_SeqFeatures;
39 is($feats[1]->start, 1);
40 is($feats[1]->end, 946);
41 is($feats[1]->get_tag_values('db_xref'), 3);
42 is($seq->annotation->get_Annotations('reference'),2);
43 is($seq->annotation->get_Annotations('dblink'),2);