[pypy-svn] r14092 - pypy/branch/dist-2.4.1/lib-python/modified-2.4.1/test

gintas at codespeak.net gintas at codespeak.net
Sat Jul 2 14:37:53 CEST 2005


Author: gintas
Date: Sat Jul  2 14:37:52 2005
New Revision: 14092

Added:
   pypy/branch/dist-2.4.1/lib-python/modified-2.4.1/test/test_format.py
      - copied, changed from r14077, pypy/branch/dist-2.4.1/lib-python/2.4.1/test/test_format.py
Log:
Updated test_format to run quicker, fixed minor incompatibility.

This test depends on several fixes in trunk (r14089, r14090).  I did not
port them to the branch to prevent merging problems.


Copied: pypy/branch/dist-2.4.1/lib-python/modified-2.4.1/test/test_format.py (from r14077, pypy/branch/dist-2.4.1/lib-python/2.4.1/test/test_format.py)
==============================================================================
--- pypy/branch/dist-2.4.1/lib-python/2.4.1/test/test_format.py	(original)
+++ pypy/branch/dist-2.4.1/lib-python/modified-2.4.1/test/test_format.py	Sat Jul  2 14:37:52 2005
@@ -53,7 +53,8 @@
 testboth("%#.*g", (110, -1.e+100/3.))
 
 # test some ridiculously large precision, expect overflow
-testboth('%12.*f', (123456, 1.0))
+#Too slow on PyPy
+#testboth('%12.*f', (123456, 1.0))
 
 # Formatting of long integers. Overflow is not ok
 overflowok = 0
@@ -234,7 +235,8 @@
     # crashes 2.2.1 and earlier:
     try:
         "%*d"%(sys.maxint, -127)
-    except MemoryError:
-        pass
+    except (MemoryError, OverflowError):
+        pass  # CPython raises MemoryError, but both CPython and PyPy raise
+              # OverflowError for string concatenation
     else:
         raise TestFailed, '"%*d"%(sys.maxint, -127) should fail'



More information about the Pypy-commit mailing list