summaryrefslogtreecommitdiffstats
path: root/Lib/unittest/case.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/unittest/case.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/unittest/case.py')
-rw-r--r--Lib/unittest/case.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/unittest/case.py b/Lib/unittest/case.py
index d82fa20..cc5f0c3 100644
--- a/Lib/unittest/case.py
+++ b/Lib/unittest/case.py
@@ -1010,8 +1010,8 @@ class TestCase(object):
if (len(first) > self._diffThreshold or
len(second) > self._diffThreshold):
self._baseAssertEqual(first, second, msg)
- firstlines = first.splitlines(True)
- secondlines = second.splitlines(True)
+ firstlines = first.splitlines(keepends=True)
+ secondlines = second.splitlines(keepends=True)
if len(firstlines) == 1 and first.strip('\r\n') == first:
firstlines = [first + '\n']
secondlines = [second + '\n']