[pypy-commit] pypy default: #1180 - bool format test in objspace tests
kostialopuhin
noreply at buildbot.pypy.org
Wed Jun 20 23:55:45 CEST 2012
Author: Konstantin Lopuhin <kostia.lopuhin at gmail.com>
Branch:
Changeset: r55734:5e4f2911909f
Date: 2012-06-18 18:54 +0400
http://bitbucket.org/pypy/pypy/changeset/5e4f2911909f/
Log: #1180 - bool format test in objspace tests
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
@@ -209,6 +209,21 @@
assert self.s("{!r}").format(x()) == self.s("32")
+class AppTestBoolFormat:
+
+ def setup_class(cls):
+ cls.w_s = cls.space.w_str
+ cls.w_b = cls.space.w_bool
+
+ def test_simple(self):
+ # present behaviour
+ # assert format(self.b(False)) == self.s("0")
+ # assert format(self.b(True)) == self.s("1")
+ # desired
+ assert format(self.b(False)) == self.s("False")
+ assert format(self.b(True)) == self.s("True")
+
+
class BaseIntegralFormattingTest:
def test_simple(self):
More information about the pypy-commit
mailing list