summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-11-19 03:11:09 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-11-19 03:11:09 (GMT)
commit6481e09084718ac87333e0ba183588142bbde93b (patch)
tree1a89e121a6c9bd761f2560bfe6dd3b68bbe8970f /Lib/test
parent1aef4440fb49e876150bb90814e231e0342eb417 (diff)
downloadcpython-6481e09084718ac87333e0ba183588142bbde93b.zip
cpython-6481e09084718ac87333e0ba183588142bbde93b.tar.gz
cpython-6481e09084718ac87333e0ba183588142bbde93b.tar.bz2
Merged revisions 76395 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r76395 | benjamin.peterson | 2009-11-18 21:00:02 -0600 (Wed, 18 Nov 2009) | 1 line #5037 proxy __unicode__ correctly ........
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_weakref.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_weakref.py b/Lib/test/test_weakref.py
index aeafdda..ba109ae 100644
--- a/Lib/test/test_weakref.py
+++ b/Lib/test/test_weakref.py
@@ -188,6 +188,17 @@ class ReferencesTestCase(TestBase):
self.assertEqual(L3[:5], p3[:5])
self.assertEqual(L3[2:5], p3[2:5])
+ def test_proxy_unicode(self):
+ # See bug 5037
+ class C(object):
+ def __str__(self):
+ return "string"
+ def __unicode__(self):
+ return u"unicode"
+ instance = C()
+ self.assertTrue("__unicode__" in dir(weakref.proxy(instance)))
+ self.assertEqual(unicode(weakref.proxy(instance)), u"unicode")
+
def test_proxy_index(self):
class C:
def __index__(self):