maint: remove Travis stuff which has been replaced with Github actions (#325)
[bioperl-live.git] / t / SeqIO / bsml_sax.t
blob189727fea85e5f261e0cf0126606e6473cc26ffc
1 # -*-Perl-*- Test Harness script for Bioperl
2 # $Id$
4 use strict;
6 BEGIN {
7         use Bio::Root::Test;
8         
9         test_begin(-tests => 15,
10                            -requires_modules => [qw(XML::SAX
11                                                                             XML::SAX::Writer
12                                                                             XML::SAX::PurePerl
13                                                                                 XML::SAX::Base)]);
14     
15         use_ok('Bio::SeqIO');
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',
25                           -verbose => $verbose,
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');
30 is(@refs, 2);
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;
38 is(@feats, 2);
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);