Committed by =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= <
ilm...@ilmari.org>
Silence some spurious warnings in the tests
---
t/02attribs.t | 1 +
t/04misc.t | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/t/02attribs.t b/t/02attribs.t
index 9547d27..57b044a 100644
--- a/t/02attribs.t
+++ b/t/02attribs.t
@@ -1619,6 +1619,7 @@ SKIP: {
for my $destroy (0,1) {
+ local $SIG{__WARN__} = sub { warn $_[0] unless $_[0] =~ /DESTROY failed: no connection/ }; # shut up destroy warning
$dbh = connect_database({nosetup => 1, AutoCommit => 1});
$sth = $dbh->prepare($SQL);
$sth->execute(1);
diff --git a/t/04misc.t b/t/04misc.t
index 4fcff8e..e032486 100644
--- a/t/04misc.t
+++ b/t/04misc.t
@@ -113,6 +113,8 @@ $BC$
is( $sth->err, undef, q{Statement attribute 'err' is initially undef});
+ $dbh->do(q{SET client_min_messages = 'FATAL'});
+
TODO: {
local $TODO = q{Known bug: notice and warnings should set err to 6};
@@ -122,8 +124,6 @@ $BC$
}
}
- $dbh->do(q{SET client_min_messages = 'FATAL'});
-
for my $level (qw/exception/) {
eval { $sth->execute($level);};
is( $sth->err, 7, qq{Statement attribute 'err' set to 7 for level $level});
--
1.8.4