1#!/usr/bin/env python
2#
3# test_codecmaps_tw.py
4#   Codec mapping tests for ROC encodings
5#
6
7from test import test_support
8from test import test_multibytecodec_support
9import unittest
10
11class 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
17class 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
27def test_main():
28    test_support.run_unittest(__name__)
29
30if __name__ == "__main__":
31    test_main()
32