Commit 7ac04b4a authored by Andy Yates's avatar Andy Yates
Browse files

Switched to Test::More and done_testing(). This should stop tests from failing...

Switched to Test::More and done_testing(). This should stop tests from failing due to poor test count specification.
parent ca819316
use Test;
use strict;
BEGIN { $| = 1; plan tests => 9 }
use Test::More;
use Bio::EnsEMBL::Test::MultiTestDB;
......@@ -59,4 +58,4 @@ ok(scalar($sth->rows) == 20);
$sth->finish;
done_testing();
......@@ -2,10 +2,7 @@ use strict;
use warnings;
no warnings qw(uninitialized);
BEGIN { $| = 1;
use Test;
plan tests => 20;
}
use Test::More;
use Bio::EnsEMBL::Test::MultiTestDB;
use Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor;
......@@ -188,4 +185,5 @@ sub _print_asi {
"\n\tTranslations: ".(join(", ", map { $_->stable_id } @{ $asi->get_all_translation_archive_ids })).
"\n\tPeptide: ".$asi->get_peptide."\n" );
}
done_testing();
use strict;
use warnings;
BEGIN { $| = 1;
use Test;
plan tests => 4;
}
use Test::More;
use Bio::EnsEMBL::Test::TestUtils;
use Bio::EnsEMBL::Utils::Argument qw(rearrange);
......@@ -30,3 +25,5 @@ ok($three == 3);
my $zero;
($one, $zero) = rearrange(['ONE', 'ZERO'], @args);
ok(defined($zero) && $zero == 0 && $one == 1);
done_testing();
\ No newline at end of file
use strict;
BEGIN { $| = 1;
use Test;
plan tests => 7;
}
use Test::More;
use Bio::EnsEMBL::Test::MultiTestDB;
......@@ -133,3 +129,5 @@ sub print_projection {
debug("[$start-$end] $seq_reg");
}
}
done_testing();
......@@ -2,10 +2,7 @@ use strict;
use Bio::EnsEMBL::Test::TestUtils;
BEGIN { $| = 1;
use Test;
plan tests => 10;
}
use Test::More;
use Bio::EnsEMBL::Test::MultiTestDB;
use Bio::EnsEMBL::AssemblyExceptionFeature;
......@@ -91,3 +88,4 @@ ok($aef_new->dbID == $asx_id);
$aefa->remove($aef_store);
done_testing();
use strict;
BEGIN { $| = 1;
use Test ;
plan tests => 27;
}
use Test::More;
use Bio::EnsEMBL::Test::MultiTestDB;
use Bio::EnsEMBL::Test::TestUtils;
......@@ -145,3 +142,4 @@ sub print_coords {
}
}
done_testing();
......@@ -8,10 +8,7 @@ use Bio::EnsEMBL::Test::TestUtils;
our $verbose = 0; #set to 1 to turn on debug printouts
BEGIN { $| = 1;
use Test;
plan tests => 8;
}
use Test::More;
use Bio::EnsEMBL::Test::TestUtils;
......@@ -43,3 +40,4 @@ ok(test_getter_setter($attrib, 'code', 'newcode'));
ok(test_getter_setter($attrib, 'description', 'newdesc'));
ok(test_getter_setter($attrib, 'value', 'newvalue'));
done_testing();
\ No newline at end of file
use strict;
use warnings;
BEGIN { $| = 1;
use Test;
plan tests => 35;
}
use Test::More;
use Bio::EnsEMBL::Test::TestUtils;
use Bio::EnsEMBL::Test::MultiTestDB;
......@@ -125,3 +120,5 @@ ok($slice);
my %features = %{$slice->get_generic_features()};
ok(!%features);
done_testing();
use strict;
BEGIN { $| = 1;
use Test ;
plan tests => 14;
}
use Test::More;
use Bio::EnsEMBL::Test::MultiTestDB;
use Bio::EnsEMBL::Test::TestUtils;
......@@ -143,3 +139,4 @@ sub print_coords {
}
}
done_testing();
\ No newline at end of file
use strict;
use warnings;
BEGIN { $| = 1;
use Test;
plan tests => 3;
}
use Test::More;
use Bio::EnsEMBL::Test::TestUtils;
......@@ -70,3 +66,5 @@ ok(('N' x $flanking) . $seq . ('N' x $flanking) eq $new_seq);
debug("Retrieved sequence (with $flanking flanking): $new_seq");
$multi_db->restore('core', 'dnac', 'seq_region');
done_testing();
......@@ -7,11 +7,7 @@ use Bio::EnsEMBL::Test::TestUtils;
our $verbose = 0;
BEGIN { $| = 1;
use Test;
plan tests => 12;
}
use Test::More;
my $name = 'chromosome';
my $version = 'NCBI33';
......@@ -105,3 +101,5 @@ $coord_system = Bio::EnsEMBL::CoordSystem->new
ok($coord_system->name() eq $name);
ok($coord_system->is_top_level());
ok($coord_system->rank() == 0);
done_testing();
use strict;
BEGIN { $| = 1;
use Test ;
plan tests => 37;
}
use Test::More;
use Bio::EnsEMBL::Test::MultiTestDB;
use Bio::EnsEMBL::Test::TestUtils;
......@@ -183,11 +179,4 @@ ok( @{$new_paths2} == 0 ); # Should not update second time round
$multi->restore('core', 'coord_system');
$multi->restore('core', 'meta');
done_testing();
......@@ -11,14 +11,7 @@ use Bio::EnsEMBL::Test::TestUtils;
our $verbose = 0; #set to 1 to turn on debug printouts
BEGIN { $| = 1;
use Test;
plan tests => 4;
}
use Test::More;
use Bio::EnsEMBL::Test::TestUtils;
my $multi = Bio::EnsEMBL::Test::MultiTestDB->new;
......@@ -59,4 +52,4 @@ ok(&test_getter_setter($feat, 'start', 100));
ok(&test_getter_setter($feat, 'end', 500));
ok(&test_getter_setter($feat, 'density_value', 456));
done_testing();
......@@ -13,13 +13,7 @@ use Bio::EnsEMBL::DensityFeature;
use Bio::EnsEMBL::Test::TestUtils;
use Bio::EnsEMBL::Test::MultiTestDB;
BEGIN { $| = 1;
use Test;
plan tests => 16;
}
use Test::More;
our $verbose = 0;
verbose('WARNING');
......@@ -194,3 +188,4 @@ $multi->restore('core', 'analysis');
$multi->restore('core', 'density_type');
$multi->restore('core', 'density_feature');
done_testing();
......@@ -9,14 +9,7 @@ use Bio::EnsEMBL::Test::MultiTestDB;
use Bio::EnsEMBL::Test::TestUtils;
our $verbose = 0; #set to 1 to turn on debug printouts
BEGIN { $| = 1;
use Test;
plan tests => 9;
}
use Test::More;
use Bio::EnsEMBL::Test::TestUtils;
......@@ -53,3 +46,4 @@ ok(&test_getter_setter($dt, 'analysis', undef));
ok(&test_getter_setter($dt, 'block_size', 300));
ok(&test_getter_setter($dt, 'value_type', 'ratio'));
done_testing();
\ No newline at end of file
use strict;
BEGIN { $| = 1;
use Test;
plan tests => 20;
}
use Test::More;
use Bio::EnsEMBL::Test::MultiTestDB;
use Bio::EnsEMBL::Analysis;
......@@ -107,4 +103,4 @@ ok(count_rows($db, 'density_type') == $rows);
$multi->restore('core', 'density_type', 'analysis');
done_testing();
use strict;
BEGIN { $| = 1;
use Test;
plan tests => 9;
}
use Test::More;
use Bio::EnsEMBL::Test::MultiTestDB;
use Bio::EnsEMBL::Test::TestUtils;
......@@ -68,4 +63,4 @@ my $ditagFeatures = $adaptor->fetch_by_dbID($ditag_id)->get_ditagFeatures();
ok(scalar @$ditagFeatures);
ok($ditagFeatures->[0]->isa('Bio::EnsEMBL::Map::DitagFeature'));
1;
done_testing();
use strict;
BEGIN { $| = 1;
use Test ;
plan tests => 11;
}
use Test::More;
use Bio::EnsEMBL::Test::MultiTestDB;
use Bio::EnsEMBL::Test::TestUtils;
......@@ -103,4 +100,4 @@ ok((scalar(@$ditags) == 5) && $ditags->[0]->isa('Bio::EnsEMBL::Map::Ditag'));
my $dbIDs = $ditag_adaptor->list_dbIDs();
ok(scalar @$dbIDs);
1;
done_testing();
use strict;
BEGIN { $| = 1;
use Test;
plan tests => 18;
}
use Test::More;
use Bio::EnsEMBL::Test::MultiTestDB;
use Bio::EnsEMBL::Test::TestUtils;
......@@ -101,4 +97,4 @@ ok($ditag->dbID == $ditag_id);
my ($rstart, $rend, $rstrand) = $ditagFeature->get_ditag_location();
ok(defined($rstart) && defined($rend) && defined($rstrand));
1;
done_testing();
\ No newline at end of file
use strict;
BEGIN { $| = 1;
use Test ;
plan tests => 12;
}
use Test::More;
use Bio::EnsEMBL::Test::MultiTestDB;
use Bio::EnsEMBL::Test::TestUtils;
......@@ -151,4 +147,4 @@ ok(scalar(@$dfs) && $dfs->[0]->isa('Bio::EnsEMBL::Map::DitagFeature'));
my $dbIDs = $dfa->list_dbIDs();
ok(scalar @$dbIDs);
1;
done_testing();
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment