Issue 2517: Allow unicode messages in Exceptions again by correctly bypassing the instance dictionary when looking up __unicode__ on new-style classes

This commit is contained in:
Nick Coghlan 2008-07-08 14:08:04 +00:00
parent dbc5987e2f
commit 524b7773cc
3 changed files with 57 additions and 9 deletions

View file

@ -342,6 +342,7 @@ class ExceptionTests(unittest.TestCase):
self.failUnless(unicode(Exception))
self.failUnless(str(Exception('a')))
self.failUnless(unicode(Exception(u'a')))
self.failUnless(unicode(Exception(u'\xe1')))
def test_main():