PyXR

c:\python24\lib \ test \ test_codecmaps_cn.py



0001 #!/usr/bin/env python
0002 #
0003 # test_codecmaps_cn.py
0004 #   Codec mapping tests for PRC encodings
0005 #
0006 # $CJKCodecs: test_codecmaps_cn.py,v 1.3 2004/06/19 06:09:55 perky Exp $
0007 
0008 from test import test_support
0009 from test import test_multibytecodec_support
0010 import unittest
0011 
0012 class TestGB2312Map(test_multibytecodec_support.TestBase_Mapping,
0013                    unittest.TestCase):
0014     encoding = 'gb2312'
0015     mapfilename = 'EUC-CN.TXT'
0016     mapfileurl = 'http://people.freebsd.org/~perky/i18n/EUC-CN.TXT'
0017 
0018 class TestGBKMap(test_multibytecodec_support.TestBase_Mapping,
0019                    unittest.TestCase):
0020     encoding = 'gbk'
0021     mapfilename = 'CP936.TXT'
0022     mapfileurl = 'http://www.unicode.org/Public/MAPPINGS/VENDORS/' \
0023                  'MICSFT/WINDOWS/CP936.TXT'
0024 
0025 def test_main():
0026     suite = unittest.TestSuite()
0027     suite.addTest(unittest.makeSuite(TestGB2312Map))
0028     suite.addTest(unittest.makeSuite(TestGBKMap))
0029     test_support.run_suite(suite)
0030 
0031 test_multibytecodec_support.register_skip_expected(TestGB2312Map, TestGBKMap)
0032 if __name__ == "__main__":
0033     test_main()
0034 

Generated by PyXR 0.9.4
SourceForge.net Logo