mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-130080: fix warnings in tests (#131400)
This commit is contained in:
parent
51d309988b
commit
83479c2175
6 changed files with 82 additions and 77 deletions
|
@ -2415,7 +2415,9 @@ class TestStackSizeStability(unittest.TestCase):
|
|||
script = """def func():\n""" + i * snippet
|
||||
if async_:
|
||||
script = "async " + script
|
||||
code = compile(script, "<script>", "exec")
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter('ignore', SyntaxWarning)
|
||||
code = compile(script, "<script>", "exec")
|
||||
exec(code, ns, ns)
|
||||
return ns['func'].__code__
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue