[3.13] gh-136438: Make sure test_builtins pass with all optimization levels (GH-136474) (#136502)

(cherry picked from commit c176543349)
This commit is contained in:
sobolevn 2025-07-10 14:17:20 +03:00 committed by GitHub
parent d223739883
commit a2140fad71
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -380,7 +380,7 @@ def f(): """doc"""
# test both direct compilation and compilation via AST
codeobjs = []
codeobjs.append(compile(codestr, "<test>", "exec", optimize=optval))
tree = ast.parse(codestr)
tree = ast.parse(codestr, optimize=optval)
codeobjs.append(compile(tree, "<test>", "exec", optimize=optval))
for code in codeobjs:
ns = {}