https://github.com/python/cpython/commit/6a86030bc2519b4a6b055e0b47b9870c86db8588
commit: 6a86030bc2519b4a6b055e0b47b9870c86db8588
branch: main
author: Kirill Podoprigora <[email protected]>
committer: JelleZijlstra <[email protected]>
date: 2024-02-29T06:59:24-08:00
summary:
gh-116100: Add `test` arg to `ast.If` and `op` arg to `ast.BoolOp` calls
(#116101)
files:
M Lib/test/test_compile.py
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py
index 0126780982059a..d3e69bfedccd07 100644
--- a/Lib/test/test_compile.py
+++ b/Lib/test/test_compile.py
@@ -527,11 +527,11 @@ def test_compile_ast(self):
self.assertRaises(TypeError, compile, co1, '<ast>', 'eval')
# raise exception when node type is no start node
- self.assertRaises(TypeError, compile, _ast.If(), '<ast>', 'exec')
+ self.assertRaises(TypeError, compile, _ast.If(test=_ast.Name(id='x',
ctx=_ast.Load())), '<ast>', 'exec')
# raise exception when node has invalid children
ast = _ast.Module()
- ast.body = [_ast.BoolOp()]
+ ast.body = [_ast.BoolOp(op=_ast.Or())]
self.assertRaises(TypeError, compile, ast, '<ast>', 'exec')
def test_compile_invalid_typealias(self):
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]