summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_compile.py4
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):