Commits

Armin Rigo committed 859e416

Port this failing test from lib-python.

  • Participants
  • Parent commits b1ebea4

Comments (0)

Files changed (1)

File pypy/module/_ast/test/test_ast.py

 
         raises(TypeError, ast.Num, 1, 2)
         raises(TypeError, ast.Num, 1, 2, lineno=0)
+
+    def test_node_identity(self):
+        import _ast as ast
+        n1 = ast.Num(1)
+        n3 = ast.Num(3)
+        addop = ast.Add()
+        x = ast.BinOp(n1, addop, n3)
+        assert x.left == n1
+        assert x.op == addop
+        assert x.right == n3