mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Test not the standard utf-8 codec but gb18030 which is the most complex
codec in multibytecodec consumers.
This commit is contained in:
parent
1301892715
commit
a5e719e081
1 changed files with 4 additions and 4 deletions
|
@ -62,12 +62,12 @@ class Test_StreamWriter(unittest.TestCase):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def test_nullcoding(self):
|
def test_nullcoding(self):
|
||||||
self.assertEqual(''.decode('utf-8'), u'')
|
self.assertEqual(''.decode('gb18030'), u'')
|
||||||
self.assertEqual(unicode('', 'utf-8'), u'')
|
self.assertEqual(unicode('', 'gb18030'), u'')
|
||||||
self.assertEqual(u''.encode('utf-8'), '')
|
self.assertEqual(u''.encode('gb18030'), '')
|
||||||
|
|
||||||
def test_str_decode(self):
|
def test_str_decode(self):
|
||||||
self.assertEqual('abcd'.encode('utf-8'), 'abcd')
|
self.assertEqual('abcd'.encode('gb18030'), 'abcd')
|
||||||
|
|
||||||
def test_main():
|
def test_main():
|
||||||
suite = unittest.TestSuite()
|
suite = unittest.TestSuite()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue