mirror of
https://github.com/python/cpython.git
synced 2025-09-14 20:56:06 +00:00
Update big5hkscs codec to conform to the HKSCS:2004 revision.
This commit is contained in:
parent
27d339446a
commit
01612e7dec
6 changed files with 1868 additions and 1777 deletions
|
@ -323,9 +323,17 @@ class TestBase_Mapping(unittest.TestCase):
|
|||
|
||||
def _testpoint(self, csetch, unich):
|
||||
if (csetch, unich) not in self.pass_enctest:
|
||||
self.assertEqual(unich.encode(self.encoding), csetch)
|
||||
try:
|
||||
self.assertEqual(unich.encode(self.encoding), csetch)
|
||||
except UnicodeError, exc:
|
||||
self.fail('Encoding failed while testing %s -> %s: %s' % (
|
||||
repr(unich), repr(csetch), exc.reason))
|
||||
if (csetch, unich) not in self.pass_dectest:
|
||||
self.assertEqual(unicode(csetch, self.encoding), unich)
|
||||
try:
|
||||
self.assertEqual(csetch.decode(self.encoding), unich)
|
||||
except UnicodeError, exc:
|
||||
self.fail('Decoding failed while testing %s -> %s: %s' % (
|
||||
repr(csetch), repr(unich), exc.reason))
|
||||
|
||||
def load_teststring(encoding):
|
||||
from test import cjkencodings_test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue