[Python-3000-checkins] r58400 - python/branches/py3k/Lib/test/test_multibytecodec_support.py
guido.van.rossum
python-3000-checkins at python.org
Wed Oct 10 02:12:46 CEST 2007
Author: guido.van.rossum
Date: Wed Oct 10 02:12:46 2007
New Revision: 58400
Modified:
python/branches/py3k/Lib/test/test_multibytecodec_support.py
Log:
Don't depend on str8.splitlines() in test_chunkcoding().
Modified: python/branches/py3k/Lib/test/test_multibytecodec_support.py
==============================================================================
--- python/branches/py3k/Lib/test/test_multibytecodec_support.py (original)
+++ python/branches/py3k/Lib/test/test_multibytecodec_support.py Wed Oct 10 02:12:46 2007
@@ -31,8 +31,14 @@
self.incrementaldecoder = self.codec.incrementaldecoder
def test_chunkcoding(self):
- for native, utf8 in zip(*[map(bytes, str8(f).splitlines(1))
- for f in self.tstring]):
+ tstring_lines = []
+ for b in self.tstring:
+ lines = b.split(b"\n")
+ last = lines.pop()
+ assert last == b""
+ lines = [line + b"\n" for line in lines]
+ tstring_lines.append(lines)
+ for native, utf8 in zip(*tstring_lines):
u = self.decode(native)[0]
self.assertEqual(u, utf8.decode('utf-8'))
if self.roundtriptest:
More information about the Python-3000-checkins
mailing list