[pypy-svn] pypy default: Port this failing test from lib-python.
arigo
commits-noreply at bitbucket.org
Thu Mar 17 19:10:17 CET 2011
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r42767:859e416f3233
Date: 2011-03-17 14:00 -0400
http://bitbucket.org/pypy/pypy/changeset/859e416f3233/
Log: Port this failing test from lib-python.
diff --git a/pypy/module/_ast/test/test_ast.py b/pypy/module/_ast/test/test_ast.py
--- a/pypy/module/_ast/test/test_ast.py
+++ b/pypy/module/_ast/test/test_ast.py
@@ -232,3 +232,13 @@
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
More information about the Pypy-commit
mailing list