Fix test_exceptions.py: There were still str8 objects

in the UnicodeError constructor tests, but the
constructors take str arguments now.
This commit is contained in:
Walter Dörwald 2007-05-24 17:49:56 +00:00
parent 78c1c4d49f
commit eceb0fbb0a
1 changed files with 5 additions and 5 deletions

View File

@ -252,19 +252,19 @@ class ExceptionTests(unittest.TestCase):
'print_file_and_line' : None, 'msg' : 'msgStr', 'print_file_and_line' : None, 'msg' : 'msgStr',
'filename' : None, 'lineno' : None, 'offset' : None}), 'filename' : None, 'lineno' : None, 'offset' : None}),
(UnicodeError, (), {'args' : (),}), (UnicodeError, (), {'args' : (),}),
(UnicodeEncodeError, (str8('ascii'), 'a', 0, 1, (UnicodeEncodeError, ('ascii', 'a', 0, 1,
str8('ordinal not in range')), 'ordinal not in range'),
{'args' : ('ascii', 'a', 0, 1, {'args' : ('ascii', 'a', 0, 1,
'ordinal not in range'), 'ordinal not in range'),
'encoding' : 'ascii', 'object' : 'a', 'encoding' : 'ascii', 'object' : 'a',
'start' : 0, 'reason' : 'ordinal not in range'}), 'start' : 0, 'reason' : 'ordinal not in range'}),
(UnicodeDecodeError, (str8('ascii'), b'\xff', 0, 1, (UnicodeDecodeError, ('ascii', b'\xff', 0, 1,
str8('ordinal not in range')), 'ordinal not in range'),
{'args' : ('ascii', b'\xff', 0, 1, {'args' : ('ascii', b'\xff', 0, 1,
'ordinal not in range'), 'ordinal not in range'),
'encoding' : 'ascii', 'object' : b'\xff', 'encoding' : 'ascii', 'object' : b'\xff',
'start' : 0, 'reason' : 'ordinal not in range'}), 'start' : 0, 'reason' : 'ordinal not in range'}),
(UnicodeTranslateError, ("\u3042", 0, 1, str8("ouch")), (UnicodeTranslateError, ("\u3042", 0, 1, "ouch"),
{'args' : ('\u3042', 0, 1, 'ouch'), {'args' : ('\u3042', 0, 1, 'ouch'),
'object' : '\u3042', 'reason' : 'ouch', 'object' : '\u3042', 'reason' : 'ouch',
'start' : 0, 'end' : 1}), 'start' : 0, 'end' : 1}),