[pypy-svn] pypy shorter-float-repr: Fix translation, and another test

amauryfa commits-noreply at bitbucket.org
Fri Jan 21 01:29:22 CET 2011


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: shorter-float-repr
Changeset: r41109:b75bea57ae2c
Date: 2011-01-21 01:20 +0100
http://bitbucket.org/pypy/pypy/changeset/b75bea57ae2c/

Log:	Fix translation, and another test

diff --git a/pypy/rlib/test/test_rarithmetic.py b/pypy/rlib/test/test_rarithmetic.py
--- a/pypy/rlib/test/test_rarithmetic.py
+++ b/pypy/rlib/test/test_rarithmetic.py
@@ -390,7 +390,9 @@
     pass
 
 class TestOOtype(BaseTestRarithmetic, OORtypeMixin):
-    pass
+    def test_formatd_repr(self):
+        sys.version_info < (2, 7):
+            skip('cannot oofake short float repr before python 2.7')
 
 def test_isinf():
     assert isinf(INFINITY)

diff --git a/pypy/rpython/module/ll_dtoa.py b/pypy/rpython/module/ll_dtoa.py
--- a/pypy/rpython/module/ll_dtoa.py
+++ b/pypy/rpython/module/ll_dtoa.py
@@ -120,6 +120,8 @@
     if use_exp:
         exp = decpt - 1
         decpt = 1
+    else:
+        exp = 0
 
     # ensure vdigits_start < decpt <= vdigits_end, or vdigits_start <
     # decpt < vdigits_end if add_dot_0_if_integer and no exponent


More information about the Pypy-commit mailing list