]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-136438: Make sure `test_builtins` pass with all optimization levels (GH...
authorsobolevn <mail@sobolevn.me>
Thu, 10 Jul 2025 11:17:20 +0000 (14:17 +0300)
committerGitHub <noreply@github.com>
Thu, 10 Jul 2025 11:17:20 +0000 (11:17 +0000)
(cherry picked from commit c17654334946b232aa296696cf70ec93a09d8156)

Lib/test/test_builtin.py

index 70987dd4881e9599da9bc79fec4a68e4bf356d09..88ece3cd8deacd622160ac371197e3c24357bec3 100644 (file)
@@ -380,7 +380,7 @@ class BuiltinTest(unittest.TestCase):
             # 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 = {}