summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_io.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2011-09-28 14:37:55 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2011-09-28 14:37:55 (GMT)
commitd8b509b192a67f0f217ae52ed81fc91bc27a1818 (patch)
treeadab8922723e179e67d546100d19d06d444d7599 /Lib/test/test_io.py
parenta6e50f589fa328a77b70cde0747f70210c650f49 (diff)
downloadcpython-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_io.py')
-rw-r--r--Lib/test/test_io.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py
index 2c502ab..117f8ab 100644
--- a/Lib/test/test_io.py
+++ b/Lib/test/test_io.py
@@ -1935,8 +1935,8 @@ class TextIOWrapperTest(unittest.TestCase):
testdata = b"AAA\nBB\x00B\nCCC\rDDD\rEEE\r\nFFF\r\nGGG"
normalized = testdata.replace(b"\r\n", b"\n").replace(b"\r", b"\n")
for newline, expected in [
- (None, normalized.decode("ascii").splitlines(True)),
- ("", testdata.decode("ascii").splitlines(True)),
+ (None, normalized.decode("ascii").splitlines(keepends=True)),
+ ("", testdata.decode("ascii").splitlines(keepends=True)),
("\n", ["AAA\n", "BB\x00B\n", "CCC\rDDD\rEEE\r\n", "FFF\r\n", "GGG"]),
("\r\n", ["AAA\nBB\x00B\nCCC\rDDD\rEEE\r\n", "FFF\r\n", "GGG"]),
("\r", ["AAA\nBB\x00B\nCCC\r", "DDD\r", "EEE\r", "\nFFF\r", "\nGGG"]),