← Back to team overview

testtools-dev team mailing list archive

[Bug 593190] Re: assertThat shouldn't unconditionally print matchee on mismatch

 

** Tags added: matchers

-- 
assertThat shouldn't unconditionally print matchee on mismatch
https://bugs.launchpad.net/bugs/593190
You received this bug notification because you are a member of testtools
developers, which is subscribed to testtools.

Status in testtools: Incomplete

Bug description:
Hi,

In some cases printing the whole matchee is not helpful to the developer using
testtools.

With the support for adding details from mismatches it is possible to provide the
full matchee to the developer when the majority isn't going to be that useful.

For soupmatchers I want to get away from printing the whole HTML document,
because it could be huge and only a small part of it be useful.

I would suggest that the Mismatch was able to format the matchee for display,
giving essentially more control to the matcher, rather than assuming one size
fits all.

Thanks,

James