ยปCore Development>Code coverage>Lib/test/test_codecencodings_hk.py

Python code coverage for Lib/test/test_codecencodings_hk.py

#countcontent
1n/a#
2n/a# test_codecencodings_hk.py
3n/a# Codec encoding tests for HongKong encodings.
4n/a#
5n/a
6n/afrom test import multibytecodec_support
7n/aimport unittest
8n/a
9n/aclass Test_Big5HKSCS(multibytecodec_support.TestBase, unittest.TestCase):
10n/a encoding = 'big5hkscs'
11n/a tstring = multibytecodec_support.load_teststring('big5hkscs')
12n/a codectests = (
13n/a # invalid bytes
14n/a (b"abc\x80\x80\xc1\xc4", "strict", None),
15n/a (b"abc\xc8", "strict", None),
16n/a (b"abc\x80\x80\xc1\xc4", "replace", "abc\ufffd\ufffd\u8b10"),
17n/a (b"abc\x80\x80\xc1\xc4\xc8", "replace", "abc\ufffd\ufffd\u8b10\ufffd"),
18n/a (b"abc\x80\x80\xc1\xc4", "ignore", "abc\u8b10"),
19n/a )
20n/a
21n/aif __name__ == "__main__":
22n/a unittest.main()