mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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:
parent
a9e73640bf
commit
76a31a6bff
2 changed files with 78 additions and 111 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue