2004-01-17 10:29:29 -04:00
|
|
|
#
|
|
|
|
# test_codecmaps_tw.py
|
|
|
|
# Codec mapping tests for ROC encodings
|
|
|
|
#
|
|
|
|
|
2012-04-09 10:37:52 -03:00
|
|
|
from test import multibytecodec_support
|
2004-01-17 10:29:29 -04:00
|
|
|
import unittest
|
|
|
|
|
2012-04-09 10:37:52 -03:00
|
|
|
class TestBIG5Map(multibytecodec_support.TestBase_Mapping,
|
2004-01-17 10:29:29 -04:00
|
|
|
unittest.TestCase):
|
|
|
|
encoding = 'big5'
|
2014-11-06 09:37:49 -04:00
|
|
|
mapfileurl = 'http://www.pythontest.net/unicode/BIG5.TXT'
|
2004-01-17 10:29:29 -04:00
|
|
|
|
2012-04-09 10:37:52 -03:00
|
|
|
class TestCP950Map(multibytecodec_support.TestBase_Mapping,
|
2004-01-17 10:29:29 -04:00
|
|
|
unittest.TestCase):
|
|
|
|
encoding = 'cp950'
|
2014-11-06 09:37:49 -04:00
|
|
|
mapfileurl = 'http://www.pythontest.net/unicode/CP950.TXT'
|
2004-01-17 10:29:29 -04:00
|
|
|
pass_enctest = [
|
2007-07-23 15:06:59 -03:00
|
|
|
(b'\xa2\xcc', '\u5341'),
|
|
|
|
(b'\xa2\xce', '\u5345'),
|
2004-01-17 10:29:29 -04:00
|
|
|
]
|
2011-07-07 20:45:13 -03:00
|
|
|
codectests = (
|
|
|
|
(b"\xFFxy", "replace", "\ufffdxy"),
|
|
|
|
)
|
2004-01-17 10:29:29 -04:00
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2014-07-01 21:55:04 -03:00
|
|
|
unittest.main()
|