[Python-checkins] bpo-33912: Fix test_warnings when run with -Werror (GH-7839)
Victor Stinner
webhook-mailer at python.org
Thu Jun 21 12:13:03 EDT 2018
https://github.com/python/cpython/commit/419e88d18ccc83e182afca124d42f46794022aab
commit: 419e88d18ccc83e182afca124d42f46794022aab
branch: master
author: Christopher Frederickson <fredericc0 at students.rowan.edu>
committer: Victor Stinner <vstinner at redhat.com>
date: 2018-06-21T18:12:56+02:00
summary:
bpo-33912: Fix test_warnings when run with -Werror (GH-7839)
Add missing warning filter to test_exec_filename().
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 71f6a3003414..87f929f31478 100644
--- a/Lib/test/test_warnings/__init__.py
+++ b/Lib/test/test_warnings/__init__.py
@@ -447,6 +447,7 @@ def test_exec_filename(self):
"warnings.warn('hello', UserWarning)"),
filename, "exec")
with original_warnings.catch_warnings(record=True) as w:
+ self.module.simplefilter("always", category=UserWarning)
exec(codeobj)
self.assertEqual(w[0].filename, filename)
More information about the Python-checkins
mailing list