Kaydet (Commit) 67b6d516 authored tarafından Anthony Baxter's avatar Anthony Baxter

Fixed bug #1459029 - unicode reprs were double-escaped.

üst 262c00a2
......@@ -810,6 +810,22 @@ class UnicodeTest(
self.assertEqual(str(Foo9("foo")), "string")
self.assertEqual(unicode(Foo9("foo")), u"not unicode")
def test_unicode_repr(self):
class s1:
def __repr__(self):
return '\\n'
class s2:
def __repr__(self):
return u'\\n'
self.assertEqual(repr(s1()), '\\n')
self.assertEqual(repr(s2()), '\\n')
def test_main():
test_support.run_unittest(UnicodeTest)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment