0001 #!/usr/bin/env python 0002 # 0003 # test_codecmaps_tw.py 0004 # Codec mapping tests for ROC encodings 0005 # 0006 # $CJKCodecs: test_codecmaps_tw.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 TestBIG5Map(test_multibytecodec_support.TestBase_Mapping, 0013 unittest.TestCase): 0014 encoding = 'big5' 0015 mapfilename = 'BIG5.TXT' 0016 mapfileurl = 'http://www.unicode.org/Public/MAPPINGS/OBSOLETE/' \ 0017 'EASTASIA/OTHER/BIG5.TXT' 0018 0019 class TestCP950Map(test_multibytecodec_support.TestBase_Mapping, 0020 unittest.TestCase): 0021 encoding = 'cp950' 0022 mapfilename = 'CP950.TXT' 0023 mapfileurl = 'http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/' \ 0024 'WINDOWS/CP950.TXT' 0025 pass_enctest = [ 0026 ('\xa2\xcc', u'\u5341'), 0027 ('\xa2\xce', u'\u5345'), 0028 ] 0029 0030 def test_main(): 0031 suite = unittest.TestSuite() 0032 suite.addTest(unittest.makeSuite(TestBIG5Map)) 0033 suite.addTest(unittest.makeSuite(TestCP950Map)) 0034 test_support.run_suite(suite) 0035 0036 test_multibytecodec_support.register_skip_expected(TestBIG5Map, TestCP950Map) 0037 if __name__ == "__main__": 0038 test_main() 0039
Generated by PyXR 0.9.4