mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Bring CJKCodecs 1.1 into trunk. This completely reorganizes source
and installed layouts to make maintenance simple and easy. And it also adds four new codecs; big5hkscs, euc-jis-2004, shift-jis-2004 and iso2022-jp-2004.
This commit is contained in:
parent
264c659197
commit
2bb146f2f4
109 changed files with 34331 additions and 40239 deletions
|
@ -3,7 +3,7 @@
|
|||
# test_multibytecodec.py
|
||||
# Unit test for multibytecodec itself
|
||||
#
|
||||
# $CJKCodecs: test_multibytecodec.py,v 1.5 2004/01/06 02:26:28 perky Exp $
|
||||
# $CJKCodecs: test_multibytecodec.py,v 1.8 2004/06/19 06:09:55 perky Exp $
|
||||
|
||||
from test import test_support
|
||||
from test import test_multibytecodec_support
|
||||
|
@ -69,6 +69,12 @@ class Test_StreamWriter(unittest.TestCase):
|
|||
def test_str_decode(self):
|
||||
self.assertEqual('abcd'.encode('gb18030'), 'abcd')
|
||||
|
||||
def test_streamwriter_strwrite(self):
|
||||
s = StringIO.StringIO()
|
||||
wr = codecs.getwriter('gb18030')(s)
|
||||
wr.write('abcd')
|
||||
self.assertEqual(s.getvalue(), 'abcd')
|
||||
|
||||
def test_main():
|
||||
suite = unittest.TestSuite()
|
||||
suite.addTest(unittest.makeSuite(Test_StreamWriter))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue