diff options
author | Guido van Rossum <guido@python.org> | 2007-05-17 23:59:11 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-05-17 23:59:11 (GMT) |
commit | 024da5c2576f196dede4bfa0fc5808019bd54fd8 (patch) | |
tree | 5ddf497e06e42dac48d3d17ee288332b0a956296 /Lib/test/test_codecencodings_kr.py | |
parent | f4cfc8f6bb47e77ca954b58b436f2157b5b6f530 (diff) | |
download | cpython-024da5c2576f196dede4bfa0fc5808019bd54fd8.zip cpython-024da5c2576f196dede4bfa0fc5808019bd54fd8.tar.gz cpython-024da5c2576f196dede4bfa0fc5808019bd54fd8.tar.bz2 |
Make all the multibyte codec tests pass.
Changes to io.py, necessary to make this work:
- Redid io.StringIO as a TextIOWrapper on top of a BytesIO instance.
- Got rid of _MemoryIOMixin, folding it into BytesIO instead.
- The read() functions that take -1 to mean "eveything" now also take None.
- Added readline() support to BufferedIOBase. :-(
Diffstat (limited to 'Lib/test/test_codecencodings_kr.py')
-rw-r--r-- | Lib/test/test_codecencodings_kr.py | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/Lib/test/test_codecencodings_kr.py b/Lib/test/test_codecencodings_kr.py index 92c6a80..86663c7 100644 --- a/Lib/test/test_codecencodings_kr.py +++ b/Lib/test/test_codecencodings_kr.py @@ -13,11 +13,11 @@ class Test_CP949(test_multibytecodec_support.TestBase, unittest.TestCase): tstring = test_multibytecodec_support.load_teststring('cp949') codectests = ( # invalid bytes - ("abc\x80\x80\xc1\xc4", "strict", None), - ("abc\xc8", "strict", None), - ("abc\x80\x80\xc1\xc4", "replace", "abc\ufffd\uc894"), - ("abc\x80\x80\xc1\xc4\xc8", "replace", "abc\ufffd\uc894\ufffd"), - ("abc\x80\x80\xc1\xc4", "ignore", "abc\uc894"), + (b"abc\x80\x80\xc1\xc4", "strict", None), + (b"abc\xc8", "strict", None), + (b"abc\x80\x80\xc1\xc4", "replace", "abc\ufffd\uc894"), + (b"abc\x80\x80\xc1\xc4\xc8", "replace", "abc\ufffd\uc894\ufffd"), + (b"abc\x80\x80\xc1\xc4", "ignore", "abc\uc894"), ) class Test_EUCKR(test_multibytecodec_support.TestBase, unittest.TestCase): @@ -25,11 +25,11 @@ class Test_EUCKR(test_multibytecodec_support.TestBase, unittest.TestCase): tstring = test_multibytecodec_support.load_teststring('euc_kr') codectests = ( # invalid bytes - ("abc\x80\x80\xc1\xc4", "strict", None), - ("abc\xc8", "strict", None), - ("abc\x80\x80\xc1\xc4", "replace", "abc\ufffd\uc894"), - ("abc\x80\x80\xc1\xc4\xc8", "replace", "abc\ufffd\uc894\ufffd"), - ("abc\x80\x80\xc1\xc4", "ignore", "abc\uc894"), + (b"abc\x80\x80\xc1\xc4", "strict", None), + (b"abc\xc8", "strict", None), + (b"abc\x80\x80\xc1\xc4", "replace", "abc\ufffd\uc894"), + (b"abc\x80\x80\xc1\xc4\xc8", "replace", "abc\ufffd\uc894\ufffd"), + (b"abc\x80\x80\xc1\xc4", "ignore", "abc\uc894"), ) class Test_JOHAB(test_multibytecodec_support.TestBase, unittest.TestCase): @@ -37,11 +37,11 @@ class Test_JOHAB(test_multibytecodec_support.TestBase, unittest.TestCase): tstring = test_multibytecodec_support.load_teststring('johab') codectests = ( # invalid bytes - ("abc\x80\x80\xc1\xc4", "strict", None), - ("abc\xc8", "strict", None), - ("abc\x80\x80\xc1\xc4", "replace", "abc\ufffd\ucd27"), - ("abc\x80\x80\xc1\xc4\xc8", "replace", "abc\ufffd\ucd27\ufffd"), - ("abc\x80\x80\xc1\xc4", "ignore", "abc\ucd27"), + (b"abc\x80\x80\xc1\xc4", "strict", None), + (b"abc\xc8", "strict", None), + (b"abc\x80\x80\xc1\xc4", "replace", "abc\ufffd\ucd27"), + (b"abc\x80\x80\xc1\xc4\xc8", "replace", "abc\ufffd\ucd27\ufffd"), + (b"abc\x80\x80\xc1\xc4", "ignore", "abc\ucd27"), ) def test_main(): |