bpo-33912: Fix test_warnings when run with -Werror (GH-7839)
Add missing warning filter to test_exec_filename().
This commit is contained in:
parent
3ad8decd76
commit
419e88d18c
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue