summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_exceptions.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_exceptions.py')
-rw-r--r--Lib/test/test_exceptions.py16
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