PyXR

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



0001 #!/usr/bin/env python
0002 #
0003 # test_codecmaps_kr.py
0004 #   Codec mapping tests for ROK encodings
0005 #
0006 # $CJKCodecs: test_codecmaps_kr.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 TestCP949Map(test_multibytecodec_support.TestBase_Mapping,
0013                    unittest.TestCase):
0014     encoding = 'cp949'
0015     mapfilename = 'CP949.TXT'
0016     mapfileurl = 'http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT' \
0017                  '/WINDOWS/CP949.TXT'
0018 
0019 
0020 class TestEUCKRMap(test_multibytecodec_support.TestBase_Mapping,
0021                    unittest.TestCase):
0022     encoding = 'euc_kr'
0023     mapfilename = 'EUC-KR.TXT'
0024     mapfileurl = 'http://people.freebsd.org/~perky/i18n/EUC-KR.TXT'
0025 
0026 
0027 class TestJOHABMap(test_multibytecodec_support.TestBase_Mapping,
0028                    unittest.TestCase):
0029     encoding = 'johab'
0030     mapfilename = 'JOHAB.TXT'
0031     mapfileurl = 'http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/' \
0032                  'KSC/JOHAB.TXT'
0033     # KS X 1001 standard assigned 0x5c as WON SIGN.
0034     # but, in early 90s that is the only era used johab widely,
0035     # the most softwares implements it as REVERSE SOLIDUS.
0036     # So, we ignore the standard here.
0037     pass_enctest = [('\\', u'\u20a9')]
0038     pass_dectest = [('\\', u'\u20a9')]
0039 
0040 def test_main():
0041     suite = unittest.TestSuite()
0042     suite.addTest(unittest.makeSuite(TestCP949Map))
0043     suite.addTest(unittest.makeSuite(TestEUCKRMap))
0044     suite.addTest(unittest.makeSuite(TestJOHABMap))
0045     test_support.run_suite(suite)
0046 
0047 test_multibytecodec_support.register_skip_expected(TestCP949Map,
0048     TestEUCKRMap, TestJOHABMap)
0049 if __name__ == "__main__":
0050     test_main()
0051 

Generated by PyXR 0.9.4
SourceForge.net Logo