[Python-checkins] python/dist/src/Lib/test test_codecs.py, 1.13,
1.14
perky at users.sourceforge.net
perky at users.sourceforge.net
Mon Oct 18 01:51:24 CEST 2004
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27701/Lib/test
Modified Files:
test_codecs.py
Log Message:
SF #1048865: Fix a trivial typo that breaks StreamReader.readlines()
Index: test_codecs.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_codecs.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- test_codecs.py 7 Sep 2004 20:24:21 -0000 1.13
+++ test_codecs.py 17 Oct 2004 23:51:21 -0000 1.14
@@ -458,6 +458,16 @@
self.assertEquals(codecs.encode(u'\xe4\xf6\xfc', 'latin-1'),
'\xe4\xf6\xfc')
+class StreamReaderTest(unittest.TestCase):
+
+ def setUp(self):
+ self.reader = codecs.getreader('utf-8')
+ self.stream = StringIO.StringIO('\xed\x95\x9c\n\xea\xb8\x80')
+
+ def test_readlines(self):
+ f = self.reader(self.stream)
+ self.assertEquals(f.readlines(), [u'\ud55c\n', u'\uae00'])
+
def test_main():
test_support.run_unittest(
UTF16Test,
@@ -469,7 +479,8 @@
PunycodeTest,
NameprepTest,
CodecTest,
- CodecsModuleTest
+ CodecsModuleTest,
+ StreamReaderTest
)
More information about the Python-checkins
mailing list