Skip to content

Commit 5eef776

Browse files
sobolevnPranjal095
authored andcommitted
pythongh-136438: Make sure test_builtins pass with all optimization levels (python#136474)
1 parent b624ecf commit 5eef776

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/test_builtin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ def f(): """doc"""
436436
# test both direct compilation and compilation via AST
437437
codeobjs = []
438438
codeobjs.append(compile(codestr, "<test>", "exec", optimize=optval))
439-
tree = ast.parse(codestr)
439+
tree = ast.parse(codestr, optimize=optval)
440440
codeobjs.append(compile(tree, "<test>", "exec", optimize=optval))
441441
for code in codeobjs:
442442
ns = {}
@@ -624,7 +624,7 @@ def test_compile_ast(self):
624624
for opt in [opt1, opt2]:
625625
opt_right = opt.value.right
626626
self.assertIsInstance(opt_right, ast.Constant)
627-
self.assertEqual(opt_right.value, True)
627+
self.assertEqual(opt_right.value, __debug__)
628628

629629
def test_delattr(self):
630630
sys.spam = 1

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy