summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorChristopher Frederickson <fredericc0@students.rowan.edu>2018-06-21 16:12:56 (GMT)
committerVictor Stinner <vstinner@redhat.com>2018-06-21 16:12:56 (GMT)
commit419e88d18ccc83e182afca124d42f46794022aab (patch)
tree1a64e9d775f60e4f12c048a6f88bd45535ca64bf /Lib
parent3ad8decd76c736f393755537aeb19b5612c21761 (diff)
downloadcpython-419e88d18ccc83e182afca124d42f46794022aab.zip
cpython-419e88d18ccc83e182afca124d42f46794022aab.tar.gz
cpython-419e88d18ccc83e182afca124d42f46794022aab.tar.bz2
bpo-33912: Fix test_warnings when run with -Werror (GH-7839)
Add missing warning filter to test_exec_filename().
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_warnings/__init__.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_warnings/__init__.py b/Lib/test/test_warnings/__init__.py
index 71f6a30..87f929f 100644
--- a/Lib/test/test_warnings/__init__.py
+++ b/Lib/test/test_warnings/__init__.py
@@ -447,6 +447,7 @@ class WarnTests(BaseTest):
"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)