~ubuntu-branches/ubuntu/trusty/bioperl/trusty-proposed

« back to all changes in this revision

Viewing changes to t/RemoteDB/HIV/HIVAnnotProcessor.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
# testing Bio::DB::HIVAnnotProcessor.pm
 
2
# $Id: HIVAnnotProcessor.t 231 2008-12-11 14:32:00Z maj $
 
3
use strict;
 
4
use warnings;
 
5
 
 
6
BEGIN {
 
7
    use Bio::Root::Test;
 
8
    test_begin(
 
9
        -tests => 11,
 
10
        );
 
11
    use_ok('Bio::Seq');
 
12
    use_ok('Bio::SeqIO');
 
13
    use_ok('Bio::DB::HIV::HIVAnnotProcessor');
 
14
}
 
15
 
 
16
my $tobj = new Bio::DB::HIV::HIVAnnotProcessor();
 
17
 
 
18
#object tests
 
19
isa_ok($tobj, 'Bio::DB::HIV::HIVAnnotProcessor');
 
20
 
 
21
#compliance tests
 
22
isa_ok($tobj, 'Bio::Root::Root');
 
23
can_ok($tobj, qw( source_stream next_seq write_seq ));
 
24
 
 
25
#methods
 
26
can_ok($tobj, qw( hiv_query ));
 
27
 
 
28
#exception tests
 
29
throws_ok {$tobj->hiv_query(bless({},"narb"))} qr/BadParameter/, "bad type set exception";
 
30
 
 
31
#stream tests
 
32
my $fas = test_output_file();
 
33
open( FAS, ">", $fas ) or die;
 
34
print FAS ">goob\natcg\n";
 
35
close(FAS);
 
36
ok( $tobj->source_stream(new Bio::SeqIO(-file=>$fas, -format=>'fasta')), "attach stream");
 
37
throws_ok {$tobj->write_seq(new Bio::Seq(-sequence=>"atcg"))} qr/IOException/, "write exception";
 
38
ok( $tobj->next_seq, "access stream");
 
39
 
 
40
 
 
41