1 #!/usr/bin/env python 2 # 3 # test_codecmaps_tw.py 4 # Codec mapping tests for ROC encodings 5 # 6 7 from test import test_support 8 from test import test_multibytecodec_support 9 import unittest 10 11 class TestBIG5Map(test_multibytecodec_support.TestBase_Mapping, 12 unittest.TestCase): 13 encoding = 'big5' 14 mapfileurl = 'http://www.unicode.org/Public/MAPPINGS/OBSOLETE/' \ 15 'EASTASIA/OTHER/BIG5.TXT' 16 17 class TestCP950Map(test_multibytecodec_support.TestBase_Mapping, 18 unittest.TestCase): 19 encoding = 'cp950' 20 mapfileurl = 'http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/' \ 21 'WINDOWS/CP950.TXT' 22 pass_enctest = [ 23 ('\xa2\xcc', u'\u5341'), 24 ('\xa2\xce', u'\u5345'), 25 ] 26 27 def test_main(): 28 test_support.run_unittest(__name__) 29 30 if __name__ == "__main__": 31 test_main() 32