Permalink
Browse files

tests for inheritance should belong on the child class, not the paren…

…t class
  • Loading branch information...
1 parent 00cfe1b commit 98053e9a2b2ee26b0460a2c4ffc149d129b30b5f @carandraug carandraug committed Mar 28, 2013
Showing with 31 additions and 15 deletions.
  1. +3 −1 t/Align/SimpleAlign.t
  2. +7 −1 t/AlignIO/AlignIO.t
  3. +3 −12 t/Annotation/Annotation.t
  4. +16 −0 t/Cluster/UniGene.t
  5. +2 −1 t/Seq/Seq.t
View
@@ -7,7 +7,7 @@ BEGIN {
use lib '.';
use Bio::Root::Test;
- test_begin( -tests => 205 );
+ test_begin( -tests => 206 );
use_ok('Bio::SimpleAlign');
use_ok('Bio::AlignIO');
@@ -366,6 +366,8 @@ SKIP: {
# Bio::FeatureHolder stuff
$aln = Bio::SimpleAlign->new;
+isa_ok($aln,"Bio::AnnotatableI");
+
for my $seqset ( [qw(one AGAGGAT)], [qw(two AGACGAT)], [qw(three AGAGGTT)] ) {
$aln->add_seq(
Bio::LocatableSeq->new(
View
@@ -7,7 +7,7 @@ BEGIN {
use lib '.';
use Bio::Root::Test;
- test_begin(-tests => 28);
+ test_begin(-tests => 29);
use_ok('Bio::AlignIO');
}
@@ -39,6 +39,12 @@ my %files = (
# input file handles
+my $aln = Bio::AlignIO->new(
+ -file => test_input_file('longnames.aln'),
+ -format=>'clustalw',
+)->next_aln();
+isa_ok($aln, 'Bio::AnnotatableI');
+
while (my ($file, $fdata) = each %files) {
my ($format, $in, $out) = @{$fdata};
if ($in) {
View
@@ -7,7 +7,7 @@ BEGIN {
use lib '.';
use Bio::Root::Test;
- test_begin(-tests => 159);
+ test_begin(-tests => 152);
use_ok('Bio::Annotation::Collection');
use_ok('Bio::Annotation::DBLink');
@@ -19,9 +19,6 @@ BEGIN {
use_ok('Bio::Annotation::StructuredValue');
use_ok('Bio::Annotation::TagTree');
use_ok('Bio::Annotation::Tree');
- use_ok('Bio::Seq');
- use_ok('Bio::SimpleAlign');
- use_ok('Bio::Cluster::UniGene');
}
my $DEBUG = test_debug();
@@ -175,8 +172,8 @@ SKIP: {
}
# AnnotatableI
+use Bio::Seq;
my $seq = Bio::Seq->new();
-isa_ok($seq,"Bio::AnnotatableI");
SKIP: {
test_skip(-requires_modules => [qw(Bio::SeqFeature::Annotated URI::Escape)],
-tests => 4);
@@ -187,10 +184,6 @@ SKIP: {
isa_ok($fea, "Bio::SeqFeatureI",'isa SeqFeatureI');
isa_ok($fea, "Bio::AnnotatableI",'isa AnnotatableI');
}
-my $clu = Bio::Cluster::UniGene->new();
-isa_ok($clu, "Bio::AnnotatableI");
-my $aln = Bio::SimpleAlign->new();
-isa_ok($aln,"Bio::AnnotatableI");
# tests for Bio::Annotation::AnnotationFactory
@@ -254,11 +247,9 @@ $ann_tree->tree_id('test');
is $ann_tree->tree_id(), 'test', "tree_id()";
$ann_tree->tagname('tree');
is $ann_tree->tagname(), 'tree', "tagname()";
-my $aln_filename = test_input_file('longnames.aln');
use Bio::AlignIO;
-$aln = Bio::AlignIO->new(-file => $aln_filename,
+my $aln = Bio::AlignIO->new(-file => test_input_file('longnames.aln'),
-format=>'clustalw')->next_aln();
-isa_ok($aln, 'Bio::AnnotatableI');
$ac = Bio::Annotation::Collection->new();
$ac->add_Annotation('tree',$ann_tree);
$aln->annotation($ac);
View
@@ -0,0 +1,16 @@
+# -*-Perl-*- Test Harness script for Bioperl
+# $Id$
+
+use strict;
+
+BEGIN {
+ use lib '.';
+ use Bio::Root::Test;
+
+ test_begin(-tests => 2);
+
+ use_ok('Bio::Cluster::UniGene');
+}
+
+my $clu = Bio::Cluster::UniGene->new();
+isa_ok($clu, "Bio::AnnotatableI");
View
@@ -7,7 +7,7 @@ BEGIN {
use lib '.';
use Bio::Root::Test;
- test_begin(-tests => 72);
+ test_begin(-tests => 73);
use_ok('Bio::Seq');
use_ok('Bio::Seq::RichSeq');
@@ -21,6 +21,7 @@ ok my $seq = Bio::Seq->new(-seq=>'ACTGTGGCGTCAACT',
-alphabet => 'dna',
-is_circular => 1
);
+isa_ok($seq,"Bio::AnnotatableI");
ok $seq->is_circular;
ok not $seq->is_circular(0);

0 comments on commit 98053e9

Please sign in to comment.