mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
#13012: use splitlines(keepends=True/False) instead of splitlines(0/1).
This commit is contained in:
parent
a6e50f589f
commit
d8b509b192
16 changed files with 39 additions and 39 deletions
|
|
@ -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']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue