diff options
author | Victor Stinner <vstinner@redhat.com> | 2018-06-04 05:14:46 (GMT) |
---|---|---|
committer | Ned Deily <nad@python.org> | 2018-06-04 05:14:46 (GMT) |
commit | e292b75e3ecdc6bbe81cda09de836dc9e27ab9e6 (patch) | |
tree | 55039c5d41187269f68df9a95f3a47f40ea9c965 /Lib/test/test_warnings/__init__.py | |
parent | 6b87399f0f337d68a71ae55cd9a8667f27a3d2dc (diff) | |
download | cpython-e292b75e3ecdc6bbe81cda09de836dc9e27ab9e6.zip cpython-e292b75e3ecdc6bbe81cda09de836dc9e27ab9e6.tar.gz cpython-e292b75e3ecdc6bbe81cda09de836dc9e27ab9e6.tar.bz2 |
bpo-33509: Fix test_warnings for python3 -Werror (GH-7365)
Fix test_warnings.test_module_globals() when python3 is run with
-Werror.
Diffstat (limited to 'Lib/test/test_warnings/__init__.py')
-rw-r--r-- | Lib/test/test_warnings/__init__.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_warnings/__init__.py b/Lib/test/test_warnings/__init__.py index 940db5c..b48debd 100644 --- a/Lib/test/test_warnings/__init__.py +++ b/Lib/test/test_warnings/__init__.py @@ -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) |