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