Author r.david.murray
Recipients r.david.murray
Date 2015-07-29.01:26:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I got a doctest failure that when I wrote the output to a file showed two exactly identical lines reported as being different.  Turning off the fancy diff, I could see trailing whitespace on one of the lines.  It turns out that when a fancy diff is requested, doctest explicitly goes through and strips trailing whitespace from the diff lines returned by difflib.  This seems to me to be obviously incorrect.  There is no clue in the changelog why this was done...this goes back to a massive refactoring of doctest that was done for python 2.4, and the fancy diff was introduced at that point, complete with this strange behavior.

I tried to write a test for this but couldn't get it working in the time I was willing to devote to this (I've switched to NDIFF format, which shows the whitespace error even when the actual whitespace is stripped).  Perhaps testing this via doctest isn't the best idea anyway, since it will be far to easy for the trailing whitespace in the test to get accidentally stripped.  I've attached my work as a diff for reference if someone wants to work on this.
Date User Action Args
2015-07-29 01:26:53r.david.murraysetrecipients: + r.david.murray
2015-07-29 01:26:52r.david.murraysetmessageid: <>
2015-07-29 01:26:52r.david.murraylinkissue24746 messages
2015-07-29 01:26:51r.david.murraycreate