Commit a81f01b8 authored by Magali Ruffier's avatar Magali Ruffier
Browse files

added no_warnings check in tests

parent c68a7ad4
......@@ -15,6 +15,7 @@
use strict;
use Test::More;
use Test::Warnings;
use Bio::EnsEMBL::Test::MultiTestDB;
......
......@@ -21,6 +21,7 @@ use Bio::EnsEMBL::DBSQL::AltAlleleGroupAdaptor;
use Test::More;
use Test::Exception;
use Test::Differences;
use Test::Warnings;
use Bio::EnsEMBL::Test::TestUtils;
use Bio::EnsEMBL::Test::MultiTestDB;
......
......@@ -16,6 +16,7 @@
use strict;
use warnings;
use Test::More;
use Test::Warnings;
my $loaded = 0;
END {print "not ok 1\n" unless $loaded;}
......
......@@ -17,6 +17,7 @@ use warnings;
no warnings qw(uninitialized);
use Test::More;
use Test::Warnings;
use Bio::EnsEMBL::Test::MultiTestDB;
use Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor;
......
......@@ -16,6 +16,7 @@ use strict;
use warnings;
use Test::More;
use Test::Warnings;
use Bio::EnsEMBL::Test::TestUtils;
use Bio::EnsEMBL::Utils::Argument qw(rearrange);
......@@ -40,4 +41,4 @@ my $zero;
($one, $zero) = rearrange(['ONE', 'ZERO'], @args);
ok(defined($zero) && $zero == 0 && $one == 1);
done_testing();
\ No newline at end of file
done_testing();
......@@ -15,6 +15,7 @@
use strict;
use Test::More;
use Test::Warnings;
use Bio::EnsEMBL::Test::MultiTestDB;
......
......@@ -17,6 +17,7 @@ use strict;
use Bio::EnsEMBL::Test::TestUtils;
use Test::More;
use Test::Warnings;
use Bio::EnsEMBL::Test::MultiTestDB;
use Bio::EnsEMBL::AssemblyExceptionFeature;
......
......@@ -15,6 +15,7 @@
use strict;
use Test::More;
use Test::Warnings;
use Bio::EnsEMBL::Test::MultiTestDB;
use Bio::EnsEMBL::Test::TestUtils;
......
......@@ -23,6 +23,7 @@ use Bio::EnsEMBL::Test::TestUtils;
our $verbose = 0; #set to 1 to turn on debug printouts
use Test::More;
use Test::Warnings;
use Bio::EnsEMBL::Test::TestUtils;
......@@ -54,4 +55,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
done_testing();
......@@ -15,6 +15,7 @@
use strict;
use warnings;
use Test::More;
use Test::Warnings;
use Test::Exception;
use Bio::EnsEMBL::Test::MultiTestDB;
use DBI qw/:sql_types/;
......
......@@ -16,6 +16,7 @@ use strict;
use warnings;
use Test::More;
use Test::Warnings;
use Bio::EnsEMBL::Test::TestUtils;
use Bio::EnsEMBL::Test::MultiTestDB;
......
......@@ -15,6 +15,7 @@
use strict;
use Test::More;
use Test::Warnings;
use Bio::EnsEMBL::Test::MultiTestDB;
use Bio::EnsEMBL::Test::TestUtils;
......
......@@ -15,6 +15,7 @@
use strict;
use Test::More;
use Test::Warnings;
use Bio::EnsEMBL::Test::MultiTestDB;
use Bio::EnsEMBL::Test::TestUtils;
......@@ -153,4 +154,4 @@ sub print_coords {
}
}
done_testing();
\ No newline at end of file
done_testing();
......@@ -17,8 +17,11 @@ use warnings;
use Data::Dumper;
use Test::More;
use Test::Warnings;
use Test::Exception;
use Test::Differences;
use Bio::EnsEMBL::Test::TestUtils qw/capture_std_streams/;
use Bio::EnsEMBL::Test::TestUtils;
use Bio::EnsEMBL::Test::MultiTestDB;
use Bio::EnsEMBL::ProjectionSegment;
use Bio::EnsEMBL::Utils::Exception qw(warning throw);
......@@ -151,15 +154,10 @@ is($sub_slice->invert()->seq(), 'ATGCA',
#
# Slice can be created without db, seq or coord system
#
capture_std_streams(sub {
my ($std_out_ref, $std_err_ref) = @_;
$test_slice = Bio::EnsEMBL::CircularSlice->new(-SEQ_REGION_NAME => 'test',
-START => 1,
-END => 3);
my $check = qr/MSG: CircularSlice without coordinate system/;
like(${$std_err_ref}, $check, 'Checking we are still warning about lack of coordinate system');
return;
});
my $check = qr/MSG: CircularSlice without coordinate system/;
warns_like{
$test_slice = Bio::EnsEMBL::CircularSlice->new(-SEQ_REGION_NAME => 'test', -START => 1, -END => 3)
} qr/$check/, 'Checking we are still warning about lack of coordinate system';
isa_ok($test_slice, 'Bio::EnsEMBL::CircularSlice');
is($test_slice->seq(), 'NNN','sequence of created slice is NNN');
......
......@@ -16,6 +16,7 @@ use strict;
use warnings;
use Test::More;
use Test::Warnings;
use Bio::EnsEMBL::DBEntry;
use Bio::EnsEMBL::Operon;
use Bio::EnsEMBL::Test::MultiTestDB;
......
......@@ -22,6 +22,7 @@ use Bio::EnsEMBL::Test::TestUtils;
our $verbose = 0;
use Test::More;
use Test::Warnings;
my $name = 'chromosome';
my $version = 'NCBI33';
......
......@@ -15,6 +15,7 @@
use strict;
use Test::More;
use Test::Warnings;
use Bio::EnsEMBL::Test::MultiTestDB;
use Bio::EnsEMBL::Test::TestUtils;
use Test::Exception;
......
......@@ -16,6 +16,7 @@ use strict;
use warnings;
use Test::More;
use Test::Warnings;
use Test::Exception;
use Bio::EnsEMBL::Test::MultiTestDB;
use Bio::EnsEMBL::ApiVersion;
......
......@@ -21,11 +21,10 @@ use Bio::EnsEMBL::DensityFeature;
use Bio::EnsEMBL::Test::MultiTestDB;
use Bio::EnsEMBL::Analysis;
use Bio::EnsEMBL::Test::TestUtils;
our $verbose = 0; #set to 1 to turn on debug printouts
use Test::More;
use Test::Warnings;
use Bio::EnsEMBL::Test::TestUtils;
my $multi = Bio::EnsEMBL::Test::MultiTestDB->new;
......
......@@ -28,6 +28,7 @@ use Bio::EnsEMBL::Test::TestUtils;
use Bio::EnsEMBL::Test::MultiTestDB;
use Test::More;
use Test::Warnings;
our $verbose = 0;
verbose('WARNING');
......
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