diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2011-09-28 14:37:55 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2011-09-28 14:37:55 (GMT) |
commit | d8b509b192a67f0f217ae52ed81fc91bc27a1818 (patch) | |
tree | adab8922723e179e67d546100d19d06d444d7599 /Lib/test/test_gzip.py | |
parent | a6e50f589fa328a77b70cde0747f70210c650f49 (diff) | |
download | cpython-d8b509b192a67f0f217ae52ed81fc91bc27a1818.zip cpython-d8b509b192a67f0f217ae52ed81fc91bc27a1818.tar.gz cpython-d8b509b192a67f0f217ae52ed81fc91bc27a1818.tar.bz2 |
#13012: use splitlines(keepends=True/False) instead of splitlines(0/1).
Diffstat (limited to 'Lib/test/test_gzip.py')
-rw-r--r-- | Lib/test/test_gzip.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_gzip.py b/Lib/test/test_gzip.py index 3ea5c41..9c7a96e 100644 --- a/Lib/test/test_gzip.py +++ b/Lib/test/test_gzip.py @@ -139,7 +139,7 @@ class TestGzip(unittest.TestCase): with io.BufferedReader(f) as r: lines = [line for line in r] - self.assertEqual(lines, 50 * data1.splitlines(True)) + self.assertEqual(lines, 50 * data1.splitlines(keepends=True)) def test_readline(self): self.test_write() @@ -340,7 +340,7 @@ class TestGzip(unittest.TestCase): def test_textio_readlines(self): # Issue #10791: TextIOWrapper.readlines() fails when wrapping GzipFile. - lines = (data1 * 50).decode("ascii").splitlines(True) + lines = (data1 * 50).decode("ascii").splitlines(keepends=True) self.test_write() with gzip.GzipFile(self.filename, 'r') as f: with io.TextIOWrapper(f, encoding="ascii") as t: |