diff options
author | Guido van Rossum <guido@python.org> | 2007-08-27 18:31:48 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-08-27 18:31:48 +0000 |
commit | 9c62772d5e0e096458c6f5c8e50cc84fcc1383f7 (patch) | |
tree | 088d8c2701cf01ed6e516d83aff3182de9cb555d /Lib/test/test_unicode.py | |
parent | 35d9428046e74cd9c36fb4507ca048dad32097cc (diff) | |
download | cpython-git-9c62772d5e0e096458c6f5c8e50cc84fcc1383f7.tar.gz |
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 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py index ef29b2fc5d..662acd378d 100644 --- a/Lib/test/test_unicode.py +++ b/Lib/test/test_unicode.py @@ -794,10 +794,10 @@ class UnicodeTest( self.assertEqual(b"\\N{foo}xx".decode("unicode-escape", "ignore"), "xx") # Error handling (truncated escape sequence) - self.assertRaises(UnicodeError, "\\".decode, "unicode-escape") + self.assertRaises(UnicodeError, b"\\".decode, "unicode-escape") - self.assertRaises(TypeError, "hello".decode, "test.unicode1") - self.assertRaises(TypeError, str, "hello", "test.unicode2") + self.assertRaises(TypeError, b"hello".decode, "test.unicode1") + self.assertRaises(TypeError, str, b"hello", "test.unicode2") self.assertRaises(TypeError, "hello".encode, "test.unicode1") self.assertRaises(TypeError, "hello".encode, "test.unicode2") # executes PyUnicode_Encode() |