File: test_codecmaps_cn.py

package info (click to toggle)
python3.1 3.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 56,796 kB
  • ctags: 74,428
  • sloc: python: 319,823; ansic: 286,471; asm: 9,561; sh: 5,066; makefile: 3,361; objc: 775; xml: 62
file content (33 lines) | stat: -rw-r--r-- 972 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env python
#
# test_codecmaps_cn.py
#   Codec mapping tests for PRC encodings
#

from test import support
from test import test_multibytecodec_support
import unittest

class TestGB2312Map(test_multibytecodec_support.TestBase_Mapping,
                   unittest.TestCase):
    encoding = 'gb2312'
    mapfileurl = 'http://people.freebsd.org/~perky/i18n/EUC-CN.TXT'

class TestGBKMap(test_multibytecodec_support.TestBase_Mapping,
                   unittest.TestCase):
    encoding = 'gbk'
    mapfileurl = 'http://www.unicode.org/Public/MAPPINGS/VENDORS/' \
                 'MICSFT/WINDOWS/CP936.TXT'

class TestGB18030Map(test_multibytecodec_support.TestBase_Mapping,
                     unittest.TestCase):
    encoding = 'gb18030'
    mapfileurl = 'http://source.icu-project.org/repos/icu/data/' \
                 'trunk/charset/data/xml/gb-18030-2000.xml'


def test_main():
    support.run_unittest(__name__)

if __name__ == "__main__":
    test_main()