[pytest-dev] expand comparison diff?

Brianna Laugher brianna.laugher at gmail.com
Tue Mar 19 07:29:47 CET 2013


On 19 March 2013 17:18, Brianna Laugher <brianna.laugher at gmail.com> wrote:
> tests/unit/formatters/test_WxPhrase.py:639: in
> test_mergeBackSeparableAttributesMultipleSentencesOK
>>       compare(result, expected)
> ../GFESuite-Builds/Release/release/lib/python2.7/site-packages/testfixtures/comparison.py:268:
> in compare
>>       raise AssertionError(message)
> E       AssertionError: dict not as expected:
> E
> E       values differ:
> E       frozenset(['TS']): [[WxStatBlock((Jan 01 70 16:00:00 GMT, Jan
> 01 70 22:00:00 GMT))],
> E        [WxStatBlock((Jan 01 70 10:00:00 GMT, Jan 01 70 16:00:00
> GMT))]] != [[WxStatBlock((Jan 01 70 16:00:00 GMT, Jan 01 70 22:00:00
> GMT))],
> E        [WxStatBlock((Jan 01 70 10:00:00 GMT, Jan 01 70 16:00:00 GMT))]]
>
> OK - now I can see that the assert is failing because the order is different.

Er, this is obviously not actually the case - serves me right for
having incomplete __repr__ methods.  But I still maintain it is more
useful output than what pytest currently gives.

Brianna

-- 
They've just been waiting in a mountain for the right moment:
http://modernthings.org/


More information about the Pytest-dev mailing list