[pypy-svn] r78791 - pypy/branch/fast-forward/lib-python/modified-2.7.0/test

afa at codespeak.net afa at codespeak.net
Sat Nov 6 13:25:37 CET 2010


Author: afa
Date: Sat Nov  6 13:25:35 2010
New Revision: 78791

Added:
   pypy/branch/fast-forward/lib-python/modified-2.7.0/test/test_syntax.py
      - copied, changed from r78767, pypy/branch/fast-forward/lib-python/2.7.0/test/test_syntax.py
Log:
Fixes in test_syntax:
- a limitation of CPython (20 nested blocks)
- a CPython inconstency in SyntaxError messages


Copied: pypy/branch/fast-forward/lib-python/modified-2.7.0/test/test_syntax.py (from r78767, pypy/branch/fast-forward/lib-python/2.7.0/test/test_syntax.py)
==============================================================================
--- pypy/branch/fast-forward/lib-python/2.7.0/test/test_syntax.py	(original)
+++ pypy/branch/fast-forward/lib-python/modified-2.7.0/test/test_syntax.py	Sat Nov  6 13:25:35 2010
@@ -5,7 +5,8 @@
 >>> def f(x):
 ...     global x
 Traceback (most recent call last):
-SyntaxError: name 'x' is local and global (<doctest test.test_syntax[0]>, line 1)
+  File "<doctest test.test_syntax[0]>", line 1
+SyntaxError: name 'x' is local and global
 
 The tests are all raise SyntaxErrors.  They were created by checking
 each C call that raises SyntaxError.  There are several modules that
@@ -375,7 +376,7 @@
 In 2.5 there was a missing exception and an assert was triggered in a debug
 build.  The number of blocks must be greater than CO_MAXBLOCKS.  SF #1565514
 
-   >>> while 1:
+   >>> while 1: # doctest:+SKIP
    ...  while 2:
    ...   while 3:
    ...    while 4:



More information about the Pypy-commit mailing list