diff options
author | Guido van Rossum <guido@python.org> | 2007-10-10 00:12:46 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-10-10 00:12:46 (GMT) |
commit | 49f21743beba32597d95ec217a8e434aaab45024 (patch) | |
tree | 60a79fe2ffe1b39b0c10cf567b364aa55de5a6d7 /Lib/test | |
parent | 3e623ba3ec0e1fc0491cdf6487b42c652d616ca6 (diff) | |
download | cpython-49f21743beba32597d95ec217a8e434aaab45024.zip cpython-49f21743beba32597d95ec217a8e434aaab45024.tar.gz cpython-49f21743beba32597d95ec217a8e434aaab45024.tar.bz2 |
Don't depend on str8.splitlines() in test_chunkcoding().
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_multibytecodec_support.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Lib/test/test_multibytecodec_support.py b/Lib/test/test_multibytecodec_support.py index 2073223..e51be04 100644 --- a/Lib/test/test_multibytecodec_support.py +++ b/Lib/test/test_multibytecodec_support.py @@ -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: |