diff options
author | Guido van Rossum <guido@python.org> | 2007-08-27 17:23:59 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-08-27 17:23:59 (GMT) |
commit | 39478e852827a4ca6955151bf004c7a15099a4b1 (patch) | |
tree | 05e52988c7904b7c7dad9427411bece5f9c45fcb /Lib/test/test_unicode.py | |
parent | 85825dc1ff5cc21c5f3f453b30b825a7200609cb (diff) | |
download | cpython-39478e852827a4ca6955151bf004c7a15099a4b1.zip cpython-39478e852827a4ca6955151bf004c7a15099a4b1.tar.gz cpython-39478e852827a4ca6955151bf004c7a15099a4b1.tar.bz2 |
Changes in anticipation of stricter str vs. bytes enforcement.
Diffstat (limited to 'Lib/test/test_unicode.py')
-rw-r--r-- | Lib/test/test_unicode.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py index c39ec09..ef29b2f 100644 --- a/Lib/test/test_unicode.py +++ b/Lib/test/test_unicode.py @@ -701,7 +701,7 @@ class UnicodeTest( if not sys.platform.startswith('java'): self.assertEqual( str( - buffer('character buffers are decoded to unicode'), + buffer(b'character buffers are decoded to unicode'), 'utf-8', 'strict' ), @@ -791,7 +791,7 @@ class UnicodeTest( self.assertEqual(str(b'Andr\202 x', 'ascii', 'replace'), 'Andr\uFFFD x') # Error handling (unknown character names) - self.assertEqual("\\N{foo}xx".decode("unicode-escape", "ignore"), "xx") + self.assertEqual(b"\\N{foo}xx".decode("unicode-escape", "ignore"), "xx") # Error handling (truncated escape sequence) self.assertRaises(UnicodeError, "\\".decode, "unicode-escape") |