Author: Konstantin Lopuhin <[email protected]>
Branch: 
Changeset: r55739:02f37a3b8e4d
Date: 2012-06-19 21:31 +0400
http://bitbucket.org/pypy/pypy/changeset/02f37a3b8e4d/

Log:    #1180 - cleanup

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
@@ -879,7 +879,6 @@
             return self.empty.join(buf[i:])
         
         def format_bool(self, w_bool):
-            # FIXME - this is not a proper fix
             if self.spec:
                 return self.format_int_or_long(w_bool, INT_KIND) 
             else:
diff --git a/pypy/objspace/std/test/test_newformat.py 
b/pypy/objspace/std/test/test_newformat.py
--- a/pypy/objspace/std/test/test_newformat.py
+++ b/pypy/objspace/std/test/test_newformat.py
@@ -211,17 +211,18 @@
 
 class AppTestBoolFormat:
 
-    def test_simple(self):
+    def test_str_format(self):
         assert format(False) == "False"
         assert format(True) == "True"
         assert "{0}".format(True) == "True"
         assert "{0}".format(False) == "False"
         assert "{0} or {1}".format(True, False) == "True or False"
+        assert "{} or {}".format(True, False) == "True or False"
 
-    def test_with_format(self):
+    def test_int_deletaion_format(self):
         assert "{:f}".format(True) == "1.000000"
         assert "{:05d}".format(False) == "00000"
-        # TODO - add more?
+        assert "{:g}".format(True) == "1"
 
 
 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to