[pypy-commit] pypy py3k: format() now works only on str, kill the old __unicode__ stuff

antocuni noreply at buildbot.pypy.org
Wed Mar 21 12:27:37 CET 2012


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r53860:297ffe6976a1
Date: 2012-03-21 12:12 +0100
http://bitbucket.org/pypy/pypy/changeset/297ffe6976a1/

Log:	format() now works only on str, kill the old __unicode__ stuff

diff --git a/pypy/objspace/std/test/test_obj.py b/pypy/objspace/std/test/test_obj.py
--- a/pypy/objspace/std/test/test_obj.py
+++ b/pypy/objspace/std/test/test_obj.py
@@ -64,18 +64,9 @@
         class x(object):
             def __str__(self):
                 return "Pickle"
-            def __unicode__(self):
-                return u"Cheese"
         res = format(x())
         assert res == "Pickle"
         assert isinstance(res, str)
-        res = format(x(), u"")
-        assert res == u"Cheese"
-        assert isinstance(res, unicode)
-        del x.__unicode__
-        res = format(x(), u"")
-        assert res == u"Pickle"
-        assert isinstance(res, unicode)
 
     def test_subclasshook(self):
         class x(object):


More information about the pypy-commit mailing list