8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1288097 commit 1e74361Copy full SHA for 1e74361
Lib/test/test_compile.py
@@ -8,6 +8,7 @@
8
import tempfile
9
import types
10
import textwrap
11
+import warnings
12
from test import support
13
from test.support import script_helper, requires_debug_ranges
14
from test.support.os_helper import FakePath
@@ -1231,7 +1232,9 @@ def f():
1231
1232
with self.subTest(body):
1233
namespace = {}
1234
source = textwrap.dedent(source_template.format(body))
- exec(source, namespace)
1235
+ with warnings.catch_warnings():
1236
+ warnings.simplefilter('ignore', SyntaxWarning)
1237
+ exec(source, namespace)
1238
code = namespace["f"].__code__
1239
self.assertOpcodeSourcePositionIs(
1240
code,
0 commit comments