assertRaises gives error about a lambda
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
testtools |
Fix Released
|
Critical
|
Jonathan Lange |
Bug Description
=======
FAIL: tests.test_
-------
Traceback (most recent call last):
File "/home/
db.
File "/usr/lib/
self.
File "/usr/lib/
raise MismatchError(
MismatchError: <function <lambda> at 0x365ff50> returned None
id=65, tests=46, failures=1
The MismatchError would be more helpful if it said "db.insert_
Related branches
- Robert Collins: Approve
-
Diff: 171 lines (+93/-2)4 files modifiedNEWS (+6/-0)
doc/for-test-authors.rst (+21/-0)
testtools/testcase.py (+21/-2)
testtools/tests/test_testcase.py (+45/-0)
Changed in testtools: | |
status: | In Progress → Fix Committed |
milestone: | none → next |
Changed in testtools: | |
status: | Fix Committed → Fix Released |
I think we could sanely poke inside the lambda to get at the function it calls; that may sound invasive but will:
- make our rendering nicer
- handle lambda supplied *to us* more nicely as well.