This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients michael.foord, r.david.murray
Date 2010-07-06.04:02:13
SpamBayes Score 0.023981346
Marked as misclassified No
Message-id <1278388937.66.0.26708370086.issue9174@psf.upfronthosting.co.za>
In-reply-to
Content
When assertEqual is called on a pair of strings, then in Python3 assertMultiLineEqual is called.  This function calls ndiff to display a nicely formatted multiline comparison of the strings, which would make it very easy to spot the differences...if it worked.  However, ndiff does not add newlines where they do not exist, so the output is not correctly formatted when strings without newlines are compared.

Attached is a unit test and patch.

This fix should be backported to 2.7, since assertMultiLineEqual is used there for unicode strings.

Assigning to Michael Foord for review.  Michael, you can assign it back to me if you'd like me to commit it.
History
Date User Action Args
2010-07-06 04:02:18r.david.murraysetrecipients: + r.david.murray, michael.foord
2010-07-06 04:02:17r.david.murraysetmessageid: <1278388937.66.0.26708370086.issue9174@psf.upfronthosting.co.za>
2010-07-06 04:02:15r.david.murraylinkissue9174 messages
2010-07-06 04:02:14r.david.murraycreate