Author: Philip Jenvey <[email protected]>
Branch: py3k
Changeset: r61434:52765baaf1aa
Date: 2013-02-18 17:58 -0800
http://bitbucket.org/pypy/pypy/changeset/52765baaf1aa/

Log:    fix test_newformat.test_sign: update defaults per the new float str

diff --git a/pypy/objspace/std/newformat.py b/pypy/objspace/std/newformat.py
--- a/pypy/objspace/std/newformat.py
+++ b/pypy/objspace/std/newformat.py
@@ -935,8 +935,8 @@
             tp = self._type
             self._get_locale(tp)
             if tp == "\0":
-                tp = "g"
-                default_precision = 12
+                tp = "r"
+                default_precision = 0
                 flags |= rfloat.DTSF_ADD_DOT_0
             elif tp == "n":
                 tp = "g"
@@ -949,6 +949,8 @@
                 add_pct = False
             if self._precision == -1:
                 self._precision = default_precision
+            if tp == "r":
+                type = "g"
             result, special = rfloat.double_to_string(value, tp,
                                                       self._precision, flags)
             if add_pct:
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to