diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_codeccallbacks.py | 18 | ||||
-rw-r--r-- | Lib/test/test_codecs.py | 8 |
2 files changed, 13 insertions, 13 deletions
diff --git a/Lib/test/test_codeccallbacks.py b/Lib/test/test_codeccallbacks.py index 31604ff..77834c4 100644 --- a/Lib/test/test_codeccallbacks.py +++ b/Lib/test/test_codeccallbacks.py @@ -329,7 +329,7 @@ class CodecCallbackTest(unittest.TestCase): self.check_exceptionobjectargs( UnicodeEncodeError, ["ascii", "g\xfcrk", 1, 2, "ouch"], - "'ascii' codec can't encode character u'\\xfc' in position 1: ouch" + "'ascii' codec can't encode character '\\xfc' in position 1: ouch" ) self.check_exceptionobjectargs( UnicodeEncodeError, @@ -339,23 +339,23 @@ class CodecCallbackTest(unittest.TestCase): self.check_exceptionobjectargs( UnicodeEncodeError, ["ascii", "\xfcx", 0, 1, "ouch"], - "'ascii' codec can't encode character u'\\xfc' in position 0: ouch" + "'ascii' codec can't encode character '\\xfc' in position 0: ouch" ) self.check_exceptionobjectargs( UnicodeEncodeError, ["ascii", "\u0100x", 0, 1, "ouch"], - "'ascii' codec can't encode character u'\\u0100' in position 0: ouch" + "'ascii' codec can't encode character '\\u0100' in position 0: ouch" ) self.check_exceptionobjectargs( UnicodeEncodeError, ["ascii", "\uffffx", 0, 1, "ouch"], - "'ascii' codec can't encode character u'\\uffff' in position 0: ouch" + "'ascii' codec can't encode character '\\uffff' in position 0: ouch" ) if sys.maxunicode > 0xffff: self.check_exceptionobjectargs( UnicodeEncodeError, ["ascii", "\U00010000x", 0, 1, "ouch"], - "'ascii' codec can't encode character u'\\U00010000' in position 0: ouch" + "'ascii' codec can't encode character '\\U00010000' in position 0: ouch" ) def test_unicodedecodeerror(self): @@ -374,23 +374,23 @@ class CodecCallbackTest(unittest.TestCase): self.check_exceptionobjectargs( UnicodeTranslateError, ["g\xfcrk", 1, 2, "ouch"], - "can't translate character u'\\xfc' in position 1: ouch" + "can't translate character '\\xfc' in position 1: ouch" ) self.check_exceptionobjectargs( UnicodeTranslateError, ["g\u0100rk", 1, 2, "ouch"], - "can't translate character u'\\u0100' in position 1: ouch" + "can't translate character '\\u0100' in position 1: ouch" ) self.check_exceptionobjectargs( UnicodeTranslateError, ["g\uffffrk", 1, 2, "ouch"], - "can't translate character u'\\uffff' in position 1: ouch" + "can't translate character '\\uffff' in position 1: ouch" ) if sys.maxunicode > 0xffff: self.check_exceptionobjectargs( UnicodeTranslateError, ["g\U00010000rk", 1, 2, "ouch"], - "can't translate character u'\\U00010000' in position 1: ouch" + "can't translate character '\\U00010000' in position 1: ouch" ) self.check_exceptionobjectargs( UnicodeTranslateError, diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py index 7a679b6..666f0df 100644 --- a/Lib/test/test_codecs.py +++ b/Lib/test/test_codecs.py @@ -459,10 +459,10 @@ class UTF8SigTest(ReadTest): "", "\ufeff", # Second BOM has been read and emitted "\ufeff\x00", # "\x00" read and emitted - "\ufeff\x00", # First byte of encoded u"\xff" read - "\ufeff\x00\xff", # Second byte of encoded u"\xff" read - "\ufeff\x00\xff", # First byte of encoded u"\u07ff" read - "\ufeff\x00\xff\u07ff", # Second byte of encoded u"\u07ff" read + "\ufeff\x00", # First byte of encoded "\xff" read + "\ufeff\x00\xff", # Second byte of encoded "\xff" read + "\ufeff\x00\xff", # First byte of encoded "\u07ff" read + "\ufeff\x00\xff\u07ff", # Second byte of encoded "\u07ff" read "\ufeff\x00\xff\u07ff", "\ufeff\x00\xff\u07ff", "\ufeff\x00\xff\u07ff\u0800", |