]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-143231: Do not swallow not matched warnings in assertWarns*() (GH-149229)
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 3 May 2026 10:24:57 +0000 (13:24 +0300)
committerGitHub <noreply@github.com>
Sun, 3 May 2026 10:24:57 +0000 (10:24 +0000)
commita3435d5ccc1878db52f48b0a5944cd0a78ec8fcf
treea951def7f807c8780ac727d775ba3cad25198e6e
parent8a7eddaa84e1880023ec75ed8af4d1836d9b5ed2
gh-143231: Do not swallow not matched warnings in assertWarns*() (GH-149229)

unittest.TestCase methods assertWarns() and assertWarnsRegex() no longer
swallow warnings that do not match the specified category or regex.
Nested context managers are now supported.
Doc/library/unittest.rst
Doc/whatsnew/3.15.rst
Lib/test/test_complex.py
Lib/test/test_unittest/test_assertions.py
Lib/test/test_unittest/test_case.py
Lib/unittest/case.py
Misc/NEWS.d/next/Library/2026-05-01-11-39-37.gh-issue-143231.0cOHET.rst [new file with mode: 0644]