[issue24780] unittest assertEqual difference output foiled by newlines

2019-01-14 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Sorry, I just stumbled upon issue2142 which is a similar report for unique_diff producing wrong output due to missing trailing newlines and could have been the original reason where the title was changed. But since there is a PR now towards adding

[issue24780] unittest assertEqual difference output foiled by newlines

2019-01-13 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: I have opened a PR for this. -- nosy: +nanjekyejoannah ___ Python tracker ___ ___

[issue24780] unittest assertEqual difference output foiled by newlines

2019-01-13 Thread Joannah Nanjekye
Change by Joannah Nanjekye : -- pull_requests: +11168 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue24780] unittest assertEqual difference output foiled by newlines

2019-01-13 Thread Joannah Nanjekye
Change by Joannah Nanjekye : -- pull_requests: +11168, 11169 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue24780] unittest assertEqual difference output foiled by newlines

2019-01-13 Thread Joannah Nanjekye
Change by Joannah Nanjekye : -- pull_requests: +11168, 11169, 11170 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue24780] unittest assertEqual difference output foiled by newlines

2019-01-09 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks @chris.jerdonek. I have reverted the title to original report. Since CPython now accepts PR if any one of the original authors can convert their patch to a PR with tests then it will be great. -- title: difflib.ndiff produces

[issue24780] unittest assertEqual difference output foiled by newlines

2016-09-11 Thread Adrian Chan
Adrian Chan added the comment: Is this still being worked on? I have a potential fix for this. -- nosy: +adchanw ___ Python tracker ___

[issue24780] unittest assertEqual difference output foiled by newlines

2016-03-13 Thread Robert Collins
Robert Collins added the comment: Thanks for the patch; reviewed in rietvald. -- ___ Python tracker ___ ___

[issue24780] unittest assertEqual difference output foiled by newlines

2016-02-02 Thread Anish Shah
Anish Shah added the comment: The problem is in `difflib.ndiff` function. When the string does not have a trailing newline, we get an unreadable output. After applying my patch, the following is the output of test2.py (submitted by Elena.Oat).

[issue24780] unittest assertEqual difference output foiled by newlines

2016-02-02 Thread Anish Shah
Anish Shah added the comment: I would like to work on this.. -- nosy: +anish.shah ___ Python tracker ___ ___

[issue24780] unittest assertEqual difference output foiled by newlines

2016-01-17 Thread Elena Oat
Elena Oat added the comment: The issue is not related only to the caret. In fact, as seen in the below output, the issue occurs anytime there's a newline character in the beginning or middle of the string to be compared. In short, if a newline is present in the string and it's in the

[issue24780] unittest assertEqual difference output foiled by newlines

2016-01-16 Thread Emanuel Barry
Changes by Emanuel Barry : -- components: +Tests stage: test needed -> needs patch ___ Python tracker ___

[issue24780] unittest assertEqual difference output foiled by newlines

2016-01-16 Thread anchal agarwal
Changes by anchal agarwal : Added file: http://bugs.python.org/file41636/test.py ___ Python tracker ___

[issue24780] unittest assertEqual difference output foiled by newlines

2016-01-12 Thread anchal agarwal
anchal agarwal added the comment: There is another case where the error message displayed by self.assertEqual() is weird. == FAIL: test_newline_1 (__main__.AssertEqualTest)

[issue24780] unittest assertEqual difference output foiled by newlines

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- keywords: +easy nosy: +ezio.melotti, michael.foord, rbcollins stage: -> test needed versions: -Python 3.4 ___ Python tracker

[issue24780] unittest assertEqual difference output foiled by newlines

2015-08-03 Thread R. David Murray
R. David Murray added the comment: In this particular case the problem is the lack of a trailing newline on the input string. It might be possible to improve the extended display algorithm by making sure there is a new line before the carrot line, but care must be taken to account for the

[issue24780] unittest assertEqual difference output foiled by newlines

2015-08-02 Thread Chris Jerdonek
New submission from Chris Jerdonek: When newlines are present, the error message displayed by unittest's self.assertEqual() to show where strings differ can be nonsensical. For example, the caret symbol can show up in a strange location. The first example below shows a case where things work