[issue12038] assertEqual doesn't display newline differences quite well

2021-12-09 Thread Irit Katriel
Irit Katriel added the comment: Reproduced on 3.11. -- nosy: +iritkatriel versions: +Python 3.11 -Python 3.3 ___ Python tracker ___

[issue12038] assertEqual doesn't display newline differences quite well

2011-06-26 Thread mouad
mouad mouad...@gmail.com added the comment: I took on consideration the two suggestion that was in the issue and create this patch that basically show only until the last character that differ and truncate the rest. I just included one test case, other test case if they should be included

[issue12038] assertEqual doesn't display newline differences quite well

2011-05-16 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: Yep, ensuring the truncated repr includes at least the *first* difference sounds like the right approach. -- assignee: - michael.foord ___ Python tracker rep...@bugs.python.org

[issue12038] assertEqual doesn't display newline differences quite well

2011-05-14 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: We should ensure that the first differing character in the string is always included in what is displayed as a diff. if we're going to shorten a string we should elide something that matches. -- nosy: +gregory.p.smith

[issue12038] assertEqual doesn't display newline differences quite well

2011-05-13 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: A possible fix is to condense the output by omitting stuff in the center rather than as the end: x\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx...x\nx\nx\nx\nx\nx\nx\nx\nx\nx\n x\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx...x\nx\nx\nx\nx\nx\nx\nx\nx\nx\r\n would be

[issue12038] assertEqual doesn't display newline differences quite well

2011-05-09 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: tc.assertEqual(x\n * 40 + \n, x\n * 40 + \r\n) Traceback (most recent call last): File stdin, line 1, in module File /home/antoine/cpython/default/Lib/unittest/case.py, line 662, in assertEqual assertion_func(first, second, msg=msg)

[issue12038] assertEqual doesn't display newline differences quite well

2011-05-09 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: Yup, I agree that's pretty sucky. Any suggestions for a fix? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12038 ___