| 1 |
# |
| 2 |
# test_codecmaps_tw.py |
| 3 |
# Codec mapping tests for ROC encodings |
| 4 |
# |
| 5 |
|
| 6 |
from test import multibytecodec_support |
| 7 |
import unittest |
| 8 |
|
| 9 |
class TestBIG5Map(multibytecodec_support.TestBase_Mapping, |
| 10 |
unittest.TestCase): |
| 11 |
encoding = 'big5' |
| 12 |
mapfileurl = 'http://www.pythontest.net/unicode/BIG5.TXT' |
| 13 |
|
| 14 |
class TestCP950Map(multibytecodec_support.TestBase_Mapping, |
| 15 |
unittest.TestCase): |
| 16 |
encoding = 'cp950' |
| 17 |
mapfileurl = 'http://www.pythontest.net/unicode/CP950.TXT' |
| 18 |
pass_enctest = [ |
| 19 |
(b'\xa2\xcc', '\u5341'), |
| 20 |
(b'\xa2\xce', '\u5345'), |
| 21 |
] |
| 22 |
codectests = ( |
| 23 |
(b"\xFFxy", "replace", "\ufffdxy"), |
| 24 |
) |
| 25 |
|
| 26 |
if __name__ == "__main__": |
| 27 |
unittest.main() |