Staging
v0.5.1
https://github.com/python/cpython
Revision cee29b46a19116261b083dc803217aa754c7df40 authored by Nick Coghlan on 17 January 2019, 10:41:29 UTC, committed by Miss Islington (bot) on 17 January 2019, 10:41:29 UTC


While the introduction of ModuleNotFoundError was fully backwards
compatible on the import API consumer side, folks providing alternative
implementations of `__import__` need to make an update to be
forward compatible with clients that start relying on the new subclass.



https://bugs.python.org/issue35486
1 parent 8c34956
Raw File
Tip revision: cee29b46a19116261b083dc803217aa754c7df40 authored by Nick Coghlan on 17 January 2019, 10:41:29 UTC
bpo-35486: Note Py3.6 import system API requirement change (GH-11540)
Tip revision: cee29b4
test_codecencodings_hk.py
#
# test_codecencodings_hk.py
#   Codec encoding tests for HongKong encodings.
#

from test import multibytecodec_support
import unittest

class Test_Big5HKSCS(multibytecodec_support.TestBase, unittest.TestCase):
    encoding = 'big5hkscs'
    tstring = multibytecodec_support.load_teststring('big5hkscs')
    codectests = (
        # invalid bytes
        (b"abc\x80\x80\xc1\xc4", "strict",  None),
        (b"abc\xc8", "strict",  None),
        (b"abc\x80\x80\xc1\xc4", "replace", "abc\ufffd\ufffd\u8b10"),
        (b"abc\x80\x80\xc1\xc4\xc8", "replace", "abc\ufffd\ufffd\u8b10\ufffd"),
        (b"abc\x80\x80\xc1\xc4", "ignore",  "abc\u8b10"),
    )

if __name__ == "__main__":
    unittest.main()
back to top