diff options
author | Sanyam Khurana <8039608+CuriousLearner@users.noreply.github.com> | 2019-01-09 19:03:03 (GMT) |
---|---|---|
committer | Senthil Kumaran <skumaran@gatech.edu> | 2019-01-09 19:03:03 (GMT) |
commit | 02e33d9567aa4bd612f9f08053acbfd5e68480d0 (patch) | |
tree | 8187ea9af97664178db0c9b2b90f29de799279bd /Lib/doctest.py | |
parent | 112e4afd582515fcdcc0cde5012a4866e5cfda12 (diff) | |
download | cpython-02e33d9567aa4bd612f9f08053acbfd5e68480d0.zip cpython-02e33d9567aa4bd612f9f08053acbfd5e68480d0.tar.gz cpython-02e33d9567aa4bd612f9f08053acbfd5e68480d0.tar.bz2 |
[2.7] bpo-24746: Avoid stripping trailing whitespace in doctest fancy diff (#11482)
* bpo-24746: Avoid stripping trailing whitespace in doctest fancy diff
* [2.7] bpo-24746: Avoid stripping trailing whitespace in doctest fancy diff (GH-10639).
(cherry picked from commit cbb16459934eaf29c7c7d362939cd05550b2f21f)
Co-authored-by: Sanyam Khurana <8039608+CuriousLearner@users.noreply.github.com>
Diffstat (limited to 'Lib/doctest.py')
-rw-r--r-- | Lib/doctest.py | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/Lib/doctest.py b/Lib/doctest.py index fedf670..1d822b5 100644 --- a/Lib/doctest.py +++ b/Lib/doctest.py @@ -1651,8 +1651,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 |