[pypy-svn] r56700 - pypy/branch/2.5-features/pypy/interpreter/pyparser/test
bgola at codespeak.net
bgola at codespeak.net
Mon Jul 21 15:22:35 CEST 2008
Author: bgola
Date: Mon Jul 21 15:22:33 2008
New Revision: 56700
Modified:
pypy/branch/2.5-features/pypy/interpreter/pyparser/test/test_astbuilder.py
Log:
tests under interpreter/pyparser/test working
Modified: pypy/branch/2.5-features/pypy/interpreter/pyparser/test/test_astbuilder.py
==============================================================================
--- pypy/branch/2.5-features/pypy/interpreter/pyparser/test/test_astbuilder.py (original)
+++ pypy/branch/2.5-features/pypy/interpreter/pyparser/test/test_astbuilder.py Mon Jul 21 15:22:33 2008
@@ -169,9 +169,12 @@
"a[100, :2,]": "Module(None, Stmt([Discard(Subscript(Name('a'), 2, Tuple([Const(100), Sliceobj([Const(None), Const(2)])])))]))",
"a[100, :]": "Module(None, Stmt([Discard(Subscript(Name('a'), 2, Tuple([Const(100), Sliceobj([Const(None), Const(None)])])))]))",
- # stablecompiler can't produce AST for 2.5 syntax (yet)
+ # stablecompiler can't produce AST for 2.5 syntax
"class A(): pass": "Module(None, Stmt([Class('A', [], None, Stmt([Pass()]))]))",
+ # yield changed in 2.5, so we can not trust the stablecompiler
+ "def f(n):\n for i in range(n):\n yield n\n": "Module(None, Stmt([Function(None, 'f', [AssName('n', 0)], [], 0, None, Stmt([For(AssName('i', 0), CallFunc(Name('range'), [Name('n')], None, None), Stmt([Discard(Yield(Name('n')))]), None)]))]))",
+
# stablecompiler produces a Pass statement which does not seem very consistent
# (a module should only have a Stmt child)
"\t # hello\n": "Module(None, Stmt([]))",
More information about the Pypy-commit
mailing list