[pypy-commit] pypy py3k: fix test_newformat.test_sign: update defaults per the new float str
pjenvey
noreply at buildbot.pypy.org
Tue Feb 19 02:59:43 CET 2013
Author: Philip Jenvey <pjenvey at underboss.org>
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:
More information about the pypy-commit
mailing list