summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2022-01-23 09:28:22 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2022-01-23 09:28:22 -0500
commitf653d5eb169e3d0371eae388aecb0db0cb0b8c11 (patch)
tree0f997ba31b622f7a8ea4bed31ad0861700b1e070 /lib/sqlalchemy/testing
parent33f71953fcdf3f3e9dd7a498f669010a56a3755d (diff)
downloadsqlalchemy-f653d5eb169e3d0371eae388aecb0db0cb0b8c11.tar.gz
dont test squelched warnings against the filter
I spent days on Ibcf09af25228d39ee5a943fda82d8a9302433726 reading it over and over again and noticed this slight inaccuracy 10 seconds after I merged it. the assert_warns_message() and assert_warns() functions should not consider a mismatched warning class as valid for a match. Change-Id: Ib8944dd95bcec1a7e4963917a5f4829e2ba27732
Diffstat (limited to 'lib/sqlalchemy/testing')
-rw-r--r--lib/sqlalchemy/testing/assertions.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sqlalchemy/testing/assertions.py b/lib/sqlalchemy/testing/assertions.py
index 2a00f1c14..5c79422dd 100644
--- a/lib/sqlalchemy/testing/assertions.py
+++ b/lib/sqlalchemy/testing/assertions.py
@@ -187,6 +187,8 @@ def _expect_warnings(
if not exception or not issubclass(exception, _EXC_CLS):
if not squelch_other_warnings:
return real_warn(msg, *arg, **kw)
+ else:
+ return
if not filters and not raise_on_any_unexpected:
return