[Python-ideas] Testcase.assertsequenceequal() suggestion

Michael Foord fuzzyman at gmail.com
Fri Apr 9 00:48:28 CEST 2010


On 8 April 2010 23:33, Raymond Hettinger <raymond.hettinger at gmail.com>wrote:

>
> On Apr 8, 2010, at 3:15 PM, Michael Foord wrote:
>
>
>
> On 8 April 2010 21:47, Floris Bruynooghe <floris.bruynooghe at gmail.com>wrote:
>
>> Hi
>>
>> I've found myself modifying the
>> unittest.TestCase.assertSequenceEqual() method to suppress the diff of
>> the two sequences if the diff is more then a few lines and was
>> wondering if this was something worth considering in the stdlib in
>> some form or another.  The resulting message still contains useful
>> information since it still prints the first differing elements, and it
>> avoids flooding the screen with lots of data for long sequences.
>>
>
>
> That sounds useful. Please post a feature request on the bug tracker -
> preferably with a patch including tests.
>
>
> +1
>
> Perhaps this can be considered a bug fix -- spewing a core dump in the test
> summary not considered helpful.
>
>

I agree. Failure messages should be useful...

Michael



>
> Raymond
>



-- 
http://www.ironpythoninaction.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20100408/3893211c/attachment.html>


More information about the Python-ideas mailing list