[pypy-svn] pypy default: %.70f is not an error anymore

amauryfa commits-noreply at bitbucket.org
Wed Jan 26 08:49:39 CET 2011


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: 
Changeset: r41334:12f428519555
Date: 2011-01-26 08:46 +0100
http://bitbucket.org/pypy/pypy/changeset/12f428519555/

Log:	%.70f is not an error anymore

diff --git a/pypy/objspace/std/test/test_stringformat.py b/pypy/objspace/std/test/test_stringformat.py
--- a/pypy/objspace/std/test/test_stringformat.py
+++ b/pypy/objspace/std/test/test_stringformat.py
@@ -246,10 +246,10 @@
         assert "%*.*s"%( f, 3, 'abcde') ==  '  abc'
         assert "%*.*s"%(-f, 3, 'abcde') ==  'abc  '
 
-    def test_too_long(self):
+    def test_long_format(self):
         def f(fmt, x):
             return fmt % x
-        raises(OverflowError, f, "%.70f", 2.0)
+        assert '%.70f' % 2.0 == '2.' + '0' * 70
         assert '%.110g' % 2.0 == '2'
 
     def test_subnormal(self):


More information about the Pypy-commit mailing list