[pypy-commit] pypy int_w-refactor: another passing test which used to fail
antocuni
noreply at buildbot.pypy.org
Wed Feb 26 11:26:01 CET 2014
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: int_w-refactor
Changeset: r69458:b401ef2acac2
Date: 2014-02-26 11:08 +0100
http://bitbucket.org/pypy/pypy/changeset/b401ef2acac2/
Log: another passing test which used to fail
diff --git a/pypy/objspace/std/test/test_stringformat.py b/pypy/objspace/std/test/test_stringformat.py
--- a/pypy/objspace/std/test/test_stringformat.py
+++ b/pypy/objspace/std/test/test_stringformat.py
@@ -186,6 +186,22 @@
def test_broken_unicode(self):
raises(UnicodeDecodeError, 'Názov: %s'.__mod__, u'Jerry')
+ def test___int__(self):
+ class MyInt(object):
+ def __init__(self, x):
+ self.x = x
+ def __int__(self):
+ return self.x
+ #
+ x = MyInt(65)
+ assert '%c' % x == 'A'
+
+
+class Foo(object):
+ def __cmp__(self, other):
+ return MyInt(0)
+
+
class AppTestWidthPrec:
def test_width(self):
a = 'a'
More information about the pypy-commit
mailing list