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 serhiy.storchaka
Recipients ezio.melotti, michael.foord, pitrou, serhiy.storchaka
Date 2013-09-10.11:51:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1378813907.09.0.280972244132.issue18996@psf.upfronthosting.co.za>
In-reply-to
Content
Error message in assertEqual() is not vary useful when compared long strings with long common prefix. It looks as:

'For the first time in his life h [truncated]...' != 'For the first time in his life h [truncated]...'

With the proposed patch it will look as:

'For [25 chars]e he seemed to be vividly aware of his own existence.' != 'For [25 chars]e he felt humble. He perceived how misgui[105 chars]ers.'

New algorithm splits strings on common prefix and differing suffixes, shortens every part if it is too long, and concatenates them back. So user always see the start and the end of string, and the place of first difference with some characters before and after.
History
Date User Action Args
2013-09-10 11:51:47serhiy.storchakasetrecipients: + serhiy.storchaka, pitrou, ezio.melotti, michael.foord
2013-09-10 11:51:47serhiy.storchakasetmessageid: <1378813907.09.0.280972244132.issue18996@psf.upfronthosting.co.za>
2013-09-10 11:51:47serhiy.storchakalinkissue18996 messages
2013-09-10 11:51:46serhiy.storchakacreate