mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-33509: Fix test_warnings for python3 -Werror (GH-7365)
Fix test_warnings.test_module_globals() when python3 is run with -Werror.
This commit is contained in:
parent
6b87399f0f
commit
e292b75e3e
1 changed files with 2 additions and 0 deletions
|
@ -221,6 +221,8 @@ class FilterTests(BaseTest):
|
|||
def test_module_globals(self):
|
||||
with original_warnings.catch_warnings(record=True,
|
||||
module=self.module) as w:
|
||||
self.module.simplefilter("always", UserWarning)
|
||||
|
||||
# bpo-33509: module_globals=None must not crash
|
||||
self.module.warn_explicit('msg', UserWarning, "filename", 42,
|
||||
module_globals=None)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue