~ubuntu-branches/ubuntu/saucy/bioperl/saucy-proposed

« back to all changes in this revision

Viewing changes to t/SeqIO/bsml.t

  • Committer: Bazaar Package Importer
  • Author(s): Charles Plessy
  • Date: 2009-03-10 07:19:11 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090310071911-fukqzw54pyb1f0bd
Tags: 1.6.0-2
* Removed patch system (not used):
  - removed instuctions in debian/rules;
  - removed quilt from Build-Depends in debian/control.
* Re-enabled tests:
  - uncommented test command in debian/rules;
  - uncommented previously missing build-dependencies in debian/control.
  - Re-enabled tests and uncommented build-dependencies accordingly.
* Removed libmodule-build-perl and libtest-harness-perl from
  Build-Depends-Indep (provided by perl-modules).
* Better cleaning of empty directories using find -type d -empty -delete
  instead of rmdir in debian/rules (LP: #324001).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*-Perl-*- Test Harness script for Bioperl
 
2
# $Id: bsml.t 15176 2008-12-16 05:51:46Z jason $
 
3
 
 
4
use strict;
 
5
 
 
6
BEGIN {
 
7
        use lib '.';
 
8
        use Bio::Root::Test;
 
9
        
 
10
        test_begin(-tests => 16,
 
11
                           -requires_modules => ['XML::DOM']
 
12
                          );
 
13
        use_ok('XML::DOM');
 
14
        use_ok('Bio::SeqIO::bsml');
 
15
}
 
16
 
 
17
my $verbose = test_debug();
 
18
 
 
19
my $str = Bio::SeqIO->new(-format => 'bsml',
 
20
                          -verbose => $verbose,
 
21
                          -file => test_input_file('U83300.bsml'));
 
22
my $seq = $str->next_seq;
 
23
isa_ok($seq, 'Bio::Seq::RichSeqI');
 
24
my @refs = $seq->annotation->get_Annotations('reference');
 
25
is(@refs, 2, 'got correct number of refs');
 
26
is($seq->display_id, 'MIVN83300', 'display_id');
 
27
is($seq->molecule, 'DNA', 'molecule');
 
28
ok(! $seq->is_circular, 'is_circular');
 
29
is($seq->get_dates, 2, 'dates');
 
30
is($seq->accession_number, 'U83300', 'accession_number');
 
31
is($seq->seq_version, 1, 'seq_version');
 
32
my @feats = $seq->get_SeqFeatures;
 
33
is(@feats, 2, 'got correct number of SeqFeatures');
 
34
is($feats[1]->start, 1, 'feature start');
 
35
is($feats[1]->end, 946, 'feature end');
 
36
is($feats[1]->get_tag_values('db_xref'), 3, 'get_tag_values db_xref');
 
37
is($seq->annotation->get_Annotations('reference'), 2, 'get_Annotations reference');
 
38
is($seq->annotation->get_Annotations('dblink'), 2, 'get_Annotations dblink');