diff options
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_support.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py index 0824bb3..8f66933 100644 --- a/Lib/test/test_support.py +++ b/Lib/test/test_support.py @@ -539,11 +539,11 @@ def _filterwarnings(filters, quiet=False): if not seen and not quiet: # This filter caught nothing missing.append((msg, cat.__name__)) - for exc in reraise: - raise AssertionError("unhandled warning %r" % exc) - for filter in missing: - raise AssertionError("filter (%r, %s) did not caught any warning" % - filter) + if reraise: + raise AssertionError("unhandled warning %r" % reraise[0]) + if missing: + raise AssertionError("filter (%r, %s) did not catch any warning" % + missing[0]) @contextlib.contextmanager |