Skip to content

Commit

Permalink
move bugzilla tests to relevant test files, data to t/data, and remove
Browse files Browse the repository at this point in the history
svn path=/bioperl-live/trunk/; revision=16093
  • Loading branch information
cjfields committed Sep 16, 2009
1 parent 62403fa commit 6811790
Show file tree
Hide file tree
Showing 17 changed files with 77 additions and 211 deletions.
2 changes: 1 addition & 1 deletion t/Align/SimpleAlign.t
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ foreach my $seq ( $removed->each_seq ) {
}
}

# work out mask_columns()
# work out mask_columns(), see bug 2842
SKIP: {
test_skip(-tests => 6, -requires_module => 'IO::String');
my $io = Bio::AlignIO->new( -file => test_input_file("testaln.aln") );
Expand Down
33 changes: 32 additions & 1 deletion t/SearchIO/exonerate.t
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ BEGIN {
use lib '.';
use Bio::Root::Test;

test_begin( -tests => 45 );
test_begin( -tests => 49 );

use_ok('Bio::SearchIO');
}
Expand Down Expand Up @@ -74,3 +74,34 @@ while ( my $r = $searchio->next_result ) {
is( $hsp->hit->strand, shift @$d );
}
}

# bug 2346

my @cts = (7, 1);

$searchio = Bio::SearchIO->new(
-format => 'exonerate',
-file => test_input_file('exonerate.output.works'),
);
parse($searchio);

$searchio = Bio::SearchIO->new(
-format => 'exonerate',
-file => test_input_file('exonerate.output.dontwork'),
);
parse($searchio);

sub parse {
my ($searchio) = @_;
while( my $r = $searchio->next_result ) {
my $hsp_ct = 0;
while(my $hit = $r->next_hit){
while(my $hsp = $hit->next_hsp){
$hsp_ct++;
}
}
ok($r->query_name, "query_name");
is($hsp_ct, shift @cts);
}
}

21 changes: 20 additions & 1 deletion t/SearchIO/fasta.t
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ BEGIN {
use lib '.';
use Bio::Root::Test;

test_begin(-tests => 287);
test_begin(-tests => 289);

use_ok('Bio::SearchIO');
}
Expand Down Expand Up @@ -384,3 +384,22 @@ while(my $res = $searchio->next_result) {
is($res->algorithm, 'FASTN');
}

# bug 2537

$searchio = Bio::SearchIO->new(
-format => 'fasta',
-file => test_input_file('in.fasta'),
);

while ( my $result = $searchio->next_result() ) {
while( my $hit = $result->next_hit ) {
# process the Bio::Search::Hit::HitI object
while( my $hsp = $hit->next_hsp ) {
# process the Bio::Search::HSP::HSPI object
is($hsp->num_identical, 30, "num_identical()");
is($hsp->num_conserved, 30, "num_conserved()");
}
}
}


11 changes: 10 additions & 1 deletion t/SearchIO/psl.t
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ BEGIN {
use lib '.';
use Bio::Root::Test;

test_begin(-tests => 52);
test_begin(-tests => 53);

use_ok('Bio::SearchIO');
}
Expand Down Expand Up @@ -96,3 +96,12 @@ TODO: {
local $TODO = "next_result should really return undef, not empty string";
is( $pslparser->next_result, undef, 'next_result should be undef');
}

# bug 2850

my $searchio = Bio::SearchIO->new(
-format => 'psl',
-file => test_input_file('headerless.psl'),
);

lives_ok { my $result = $searchio->next_result };
15 changes: 14 additions & 1 deletion t/Seq/Quality.t
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ BEGIN {
use lib '.';
use Bio::Root::Test;

test_begin(-tests => 60);
test_begin(-tests => 61);

use_ok('Bio::Seq::Quality');
}

use Bio::SeqIO;

my $DEBUG = test_debug();

# create some random sequence object with no id
Expand Down Expand Up @@ -266,3 +268,14 @@ is scalar @ranges, 3;
my $min_length = 10;
@ranges = $seq->get_all_clean_ranges($min_length);
is scalar @ranges, 2;

my $seqio = Bio::SeqIO->new(
-file => test_input_file('test_clear_range.fastq'),
-format => 'fastq'
);

while ( my $seq = $seqio->next_seq() ) {
$seq->threshold(15);
lives_ok { my $newqualobj = $seq->get_clear_range };
}

35 changes: 0 additions & 35 deletions t/bugzilla/2346/in.t

This file was deleted.

23 changes: 0 additions & 23 deletions t/bugzilla/2537/in.t

This file was deleted.

108 changes: 0 additions & 108 deletions t/bugzilla/2842/mask.t

This file was deleted.

3 changes: 0 additions & 3 deletions t/bugzilla/2844/note.txt

This file was deleted.

19 changes: 0 additions & 19 deletions t/bugzilla/2847/bug.t

This file was deleted.

15 changes: 0 additions & 15 deletions t/bugzilla/2850/bug.t

This file was deleted.

3 changes: 0 additions & 3 deletions t/bugzilla/README

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 6811790

Please sign in to comment.