assertThat unconditionally prints matchee on mismatch
Bug #593190 reported by
James Westby
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
lp:~jml/testtools/assertThat-less-verbose-675323
- Robert Collins: Approve
- Michael Hudson-Doyle (community): Approve
-
Diff: 148 lines (+37/-33)3 files modifiedNEWS (+4/-0)
testtools/testcase.py (+9/-4)
testtools/tests/test_testcase.py (+24/-29)
Changed in testtools: | |
status: | New → Incomplete |
importance: | Undecided → Wishlist |
tags: | added: matchers |
tags: | added: over-verbosity |
Changed in testtools: | |
status: | Triaged → In Progress |
assignee: | nobody → Jonathan Lange (jml) |
Changed in testtools: | |
status: | In Progress → Fix Committed |
milestone: | none → next |
Changed in testtools: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
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