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

Python code coverage for Lib/test/test_codecmaps_kr.py

#countcontent
1n/a#
2n/a# test_codecmaps_kr.py
3n/a# Codec mapping tests for ROK encodings
4n/a#
5n/a
6n/afrom test import multibytecodec_support
7n/aimport unittest
8n/a
9n/aclass TestCP949Map(multibytecodec_support.TestBase_Mapping,
10n/a unittest.TestCase):
11n/a encoding = 'cp949'
12n/a mapfileurl = 'http://www.pythontest.net/unicode/CP949.TXT'
13n/a
14n/a
15n/aclass TestEUCKRMap(multibytecodec_support.TestBase_Mapping,
16n/a unittest.TestCase):
17n/a encoding = 'euc_kr'
18n/a mapfileurl = 'http://www.pythontest.net/unicode/EUC-KR.TXT'
19n/a
20n/a # A4D4 HANGUL FILLER indicates the begin of 8-bytes make-up sequence.
21n/a pass_enctest = [(b'\xa4\xd4', '\u3164')]
22n/a pass_dectest = [(b'\xa4\xd4', '\u3164')]
23n/a
24n/a
25n/aclass TestJOHABMap(multibytecodec_support.TestBase_Mapping,
26n/a unittest.TestCase):
27n/a encoding = 'johab'
28n/a mapfileurl = 'http://www.pythontest.net/unicode/JOHAB.TXT'
29n/a # KS X 1001 standard assigned 0x5c as WON SIGN.
30n/a # but, in early 90s that is the only era used johab widely,
31n/a # the most softwares implements it as REVERSE SOLIDUS.
32n/a # So, we ignore the standard here.
33n/a pass_enctest = [(b'\\', '\u20a9')]
34n/a pass_dectest = [(b'\\', '\u20a9')]
35n/a
36n/aif __name__ == "__main__":
37n/a unittest.main()