]> granicus.if.org Git - python/commitdiff
Don't depend on str8.splitlines() in test_chunkcoding().
authorGuido van Rossum <guido@python.org>
Wed, 10 Oct 2007 00:12:46 +0000 (00:12 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 10 Oct 2007 00:12:46 +0000 (00:12 +0000)
Lib/test/test_multibytecodec_support.py

index 20732237720bdc5795589a164a6759403e3182b2..e51be0414350851b4265777f41fb69a12c316eeb 100644 (file)
@@ -31,8 +31,14 @@ class TestBase:
         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: