diff options
author | Kirill Podoprigora <kirill.bast9@mail.ru> | 2024-02-29 14:59:24 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-29 14:59:24 (GMT) |
commit | 6a86030bc2519b4a6b055e0b47b9870c86db8588 (patch) | |
tree | 94ae9e7c862871cd02e4b95d09dcbfa501dab518 /Lib | |
parent | bea2795be2c08dde3830f987830414f3f12bc1eb (diff) | |
download | cpython-6a86030bc2519b4a6b055e0b47b9870c86db8588.zip cpython-6a86030bc2519b4a6b055e0b47b9870c86db8588.tar.gz cpython-6a86030bc2519b4a6b055e0b47b9870c86db8588.tar.bz2 |
gh-116100: Add `test` arg to `ast.If` and `op` arg to `ast.BoolOp` calls (#116101)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_compile.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py index 0126780..d3e69bf 100644 --- a/Lib/test/test_compile.py +++ b/Lib/test/test_compile.py @@ -527,11 +527,11 @@ class TestSpecifics(unittest.TestCase): 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): |