[Python-checkins] bpo-33509: Fix test_warnings for python3 -Werror (GH-7365)
Ned Deily
webhook-mailer at python.org
Mon Jun 4 01:14:49 EDT 2018
https://github.com/python/cpython/commit/e292b75e3ecdc6bbe81cda09de836dc9e27ab9e6
commit: e292b75e3ecdc6bbe81cda09de836dc9e27ab9e6
branch: master
author: Victor Stinner <vstinner at redhat.com>
committer: Ned Deily <nad at python.org>
date: 2018-06-04T01:14:46-04:00
summary:
bpo-33509: Fix test_warnings for python3 -Werror (GH-7365)
Fix test_warnings.test_module_globals() when python3 is run with
-Werror.
files:
M Lib/test/test_warnings/__init__.py
diff --git a/Lib/test/test_warnings/__init__.py b/Lib/test/test_warnings/__init__.py
index 940db5c143c9..b48debd31fa8 100644
--- a/Lib/test/test_warnings/__init__.py
+++ b/Lib/test/test_warnings/__init__.py
@@ -221,6 +221,8 @@ def test_once(self):
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)
More information about the Python-checkins
mailing list