Skip to content

Commit

Permalink
tests: move tests from Root to Assembly and SeqIO (fixing commit 527d74f
Browse files Browse the repository at this point in the history
)
  • Loading branch information
carandraug committed Apr 2, 2013
1 parent 7428844 commit dd028e1
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 32 deletions.
12 changes: 11 additions & 1 deletion t/Assembly/core.t
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ BEGIN {
use lib '.';
use Bio::Root::Test;

test_begin( -tests => 890,
test_begin( -tests => 892,
-requires_module => 'DB_File' );

use_ok('Bio::Seq');
Expand Down Expand Up @@ -488,4 +488,14 @@ while (my $contig = $aio->next_contig) {
isa_ok $contig, 'Bio::Assembly::Contig';
}

##############################################
# test format() and variant() in Bio::RootIO
##############################################

$in = Bio::Assembly::IO->new(
-file => test_input_file('assembly_with_singlets.ace'),
);
is $in->format, 'ace';
is $in->variant, 'consed';

exit;
31 changes: 1 addition & 30 deletions t/Root/RootIO.t
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ BEGIN {
use lib '.';
use Bio::Root::Test;

test_begin(-tests => 77);
test_begin(-tests => 69);

use_ok('Bio::Root::IO');
use_ok('Bio::SeqIO');
use_ok('Bio::Assembly::IO');
}

my $obj = Bio::Root::IO->new();
Expand Down Expand Up @@ -241,30 +239,3 @@ $line3 = $rio->_readline;
is($line3, "Bar\n");
$line3 = $rio->_readline;
is($line3, "Baz");


##############################################
# test format() and variant()
##############################################

my $in = Bio::SeqIO->new(
-file => test_input_file('bug2901.fa'),
-format => "fasta",
);
is $in->format, 'fasta';
is $in->variant, undef;

$in = Bio::SeqIO->new(
-file => test_input_file('fastq', 'illumina_faked.fastq'),
-format => "fastq",
-variant => 'illumina',
);
is $in->format, 'fastq';
is $in->variant, 'illumina';

$in = Bio::Assembly::IO->new(
-file => test_input_file('assembly_with_singlets.ace'),
);
is $in->format, 'ace';
is $in->variant, 'consed';

21 changes: 20 additions & 1 deletion t/SeqIO/SeqIO.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 => 51);
test_begin(-tests => 55);

use_ok('Bio::SeqIO');
}
Expand Down Expand Up @@ -114,6 +114,25 @@ SKIP: {
# simple tests specific to Bio::SeqIO interface (applicable to all SeqIO
# modules)

##############################################
# test format() and variant() in Bio::RootIO
##############################################

my $in = Bio::SeqIO->new(
-file => test_input_file('bug2901.fa'),
-format => "fasta",
);
is $in->format, 'fasta';
is $in->variant, undef;

$in = Bio::SeqIO->new(
-file => test_input_file('fastq', 'illumina_faked.fastq'),
-format => "fastq",
-variant => 'illumina',
);
is $in->format, 'fastq';
is $in->variant, 'illumina';

############ EXCEPTION HANDLING ############

TODO: {
Expand Down

0 comments on commit dd028e1

Please sign in to comment.