Cleanup decode_code_page_stateful() and encode_code_page()

* Fix decode_code_page_errors() result
 * Inline decode_code_page() and encode_code_page_chunk()
 * Replace the PyUnicodeObject type by PyObject
This commit is contained in:
Victor Stinner 2011-11-04 00:05:13 +01:00
parent a9e73640bf
commit 76a31a6bff
2 changed files with 78 additions and 111 deletions

View file

@ -1980,6 +1980,9 @@ class CodePageTest(unittest.TestCase):
))
def test_incremental(self):
decoded = codecs.code_page_decode(932, b'\x82', 'strict', False)
self.assertEqual(decoded, ('', 0))
decoded = codecs.code_page_decode(932,
b'\xe9\x80\xe9', 'strict',
False)