make file closing more robust
[python/dscho.git] / Lib / test / test_codecmaps_cn.py
blob34a910d8768e1c39fe207243cadffe607b0914ce
1 #!/usr/bin/env python
3 # test_codecmaps_cn.py
4 # Codec mapping tests for PRC encodings
7 from test import support
8 from test import test_multibytecodec_support
9 import unittest
11 class TestGB2312Map(test_multibytecodec_support.TestBase_Mapping,
12 unittest.TestCase):
13 encoding = 'gb2312'
14 mapfileurl = 'http://people.freebsd.org/~perky/i18n/EUC-CN.TXT'
16 class 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'
22 class 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'
29 def test_main():
30 support.run_unittest(__name__)
32 if __name__ == "__main__":
33 test_main()