PageRenderTime 6ms CodeModel.GetById 1ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/Lib/test/test_codecmaps_cn.py

http://unladen-swallow.googlecode.com/
Python | 33 lines | 21 code | 7 blank | 5 comment | 1 complexity | 92c02ca7f7b573b35e2b78d71dbf7fce MD5 | raw file
 1#!/usr/bin/env python
 2#
 3# test_codecmaps_cn.py
 4#   Codec mapping tests for PRC encodings
 5#
 6
 7from test import test_support
 8from test import test_multibytecodec_support
 9import unittest
10
11class TestGB2312Map(test_multibytecodec_support.TestBase_Mapping,
12                   unittest.TestCase):
13    encoding = 'gb2312'
14    mapfileurl = 'http://people.freebsd.org/~perky/i18n/EUC-CN.TXT'
15
16class TestGBKMap(test_multibytecodec_support.TestBase_Mapping,
17                   unittest.TestCase):
18    encoding = 'gbk'
19    mapfileurl = 'http://www.unicode.org/Public/MAPPINGS/VENDORS/' \
20                 'MICSFT/WINDOWS/CP936.TXT'
21
22class TestGB18030Map(test_multibytecodec_support.TestBase_Mapping,
23                     unittest.TestCase):
24    encoding = 'gb18030'
25    mapfileurl = 'http://source.icu-project.org/repos/icu/data/' \
26                 'trunk/charset/data/xml/gb-18030-2000.xml'
27
28
29def test_main():
30    test_support.run_unittest(__name__)
31
32if __name__ == "__main__":
33    test_main()