diff options
author | Guido van Rossum <guido@python.org> | 2007-05-02 19:09:54 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-05-02 19:09:54 (GMT) |
commit | ef87d6ed94780fe00250a551031023aeb2898365 (patch) | |
tree | 1f8989aaaec7ec5f8b2f26498317f2022bf85531 /Lib/test/test_exceptions.py | |
parent | 572dbf8f1320c0b34b9c786e5c30ba4a4b61b292 (diff) | |
download | cpython-ef87d6ed94780fe00250a551031023aeb2898365.zip cpython-ef87d6ed94780fe00250a551031023aeb2898365.tar.gz cpython-ef87d6ed94780fe00250a551031023aeb2898365.tar.bz2 |
Rip out all the u"..." literals and calls to unicode().
Diffstat (limited to 'Lib/test/test_exceptions.py')
-rw-r--r-- | Lib/test/test_exceptions.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index 5a22297..9e7d15b 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -251,19 +251,19 @@ class ExceptionTests(unittest.TestCase): 'print_file_and_line' : None, 'msg' : 'msgStr', 'filename' : None, 'lineno' : None, 'offset' : None}), (UnicodeError, (), {'message' : '', 'args' : (),}), - (UnicodeEncodeError, ('ascii', u'a', 0, 1, 'ordinal not in range'), - {'message' : '', 'args' : ('ascii', u'a', 0, 1, + (UnicodeEncodeError, ('ascii', 'a', 0, 1, 'ordinal not in range'), + {'message' : '', 'args' : ('ascii', 'a', 0, 1, 'ordinal not in range'), - 'encoding' : 'ascii', 'object' : u'a', + 'encoding' : 'ascii', 'object' : 'a', 'start' : 0, 'reason' : 'ordinal not in range'}), (UnicodeDecodeError, ('ascii', '\xff', 0, 1, 'ordinal not in range'), {'message' : '', 'args' : ('ascii', '\xff', 0, 1, 'ordinal not in range'), 'encoding' : 'ascii', 'object' : '\xff', 'start' : 0, 'reason' : 'ordinal not in range'}), - (UnicodeTranslateError, (u"\u3042", 0, 1, "ouch"), - {'message' : '', 'args' : (u'\u3042', 0, 1, 'ouch'), - 'object' : u'\u3042', 'reason' : 'ouch', + (UnicodeTranslateError, ("\u3042", 0, 1, "ouch"), + {'message' : '', 'args' : ('\u3042', 0, 1, 'ouch'), + 'object' : '\u3042', 'reason' : 'ouch', 'start' : 0, 'end' : 1}), ] try: @@ -334,9 +334,9 @@ class ExceptionTests(unittest.TestCase): # Make sure both instances and classes have a str and unicode # representation. self.failUnless(str(Exception)) - self.failUnless(unicode(Exception)) + self.failUnless(str(Exception)) + self.failUnless(str(Exception('a'))) self.failUnless(str(Exception('a'))) - self.failUnless(unicode(Exception(u'a'))) def testExceptionCleanup(self): # Make sure "except V as N" exceptions are cleaned up properly |