assertThat unconditionally prints matchee on mismatch

Bug #593190 reported by James Westby
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
testtools
Fix Released
Wishlist
Jonathan Lange

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

Related branches

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 593190] [NEW] assertThat shouldn't unconditionally print matchee on mismatch

Hmm, something should be tweaked, thats for sure. However, matcher
composition implies Mismatch composition,and I don't see printing full
context from there to make sense.

-Rob

Changed in testtools:
status: New → Incomplete
importance: Undecided → Wishlist
Jonathan Lange (jml)
tags: added: matchers
Revision history for this message
Jonathan Lange (jml) wrote :

This is a genuine issue, even if it might be tricky to solve well. I've rephrased to drop the "should" and marked as Triaged rather than incomplete.

summary: - assertThat shouldn't unconditionally print matchee on mismatch
+ assertThat unconditionally prints matchee on mismatch
Changed in testtools:
status: Incomplete → Triaged
Jonathan Lange (jml)
tags: added: over-verbosity
Jonathan Lange (jml)
Changed in testtools:
status: Triaged → In Progress
assignee: nobody → Jonathan Lange (jml)
Jonathan Lange (jml)
Changed in testtools:
status: In Progress → Fix Committed
milestone: none → next
Jonathan Lange (jml)
Changed in testtools:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.