bpo-24746: Avoid stripping trailing whitespace in doctest fancy diff (#10639)

This commit is contained in:
Sanyam Khurana 2019-01-09 19:08:38 +05:30 committed by Senthil Kumaran
parent a234e14839
commit cbb1645993
3 changed files with 49 additions and 3 deletions

View file

@ -1690,8 +1690,6 @@ class OutputChecker:
kind = 'ndiff with -expected +actual'
else:
assert 0, 'Bad diff option'
# Remove trailing whitespace on diff output.
diff = [line.rstrip() + '\n' for line in diff]
return 'Differences (%s):\n' % kind + _indent(''.join(diff))
# If we're not using diff, then simply list the expected