Stack trace still has too many levels of stack

Bug #854769 reported by Jonathan Lange
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
testtools
Fix Released
Medium
Jonathan Lange

Bug Description

Running Version: 0.9.11+bzr230~ppa33~oneiric1.

======================================================================
FAIL: tests.test_symbolfile.TestSymbolFileParsing.test_dodgy
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jml/src/pkgme-binary/symbol-database/devportalbinary/tests/test_symbolfile.py", line 23, in test_dodgy
    self.assertRaises(ValueError, SymbolFile.parse, symbol_contents)
  File "/home/jml/src/testtools/trunk/testtools/testcase.py", line 388, in assertRaises
    self.assertThat(lambda: callableObj(*args, **kwargs), matcher)
  File "/home/jml/src/testtools/trunk/testtools/testcase.py", line 411, in assertThat
    raise MismatchError(matchee, matcher, mismatch, verbose)
MismatchError: <function <lambda> at 0x1487488> returned <devportalbinary.symbolfile.SymbolFile object at 0x148a390>
id=26, tests=45, failures=8

Only the top-most level should be present in the error message.

Tags: traceback

Related branches

Revision history for this message
Jonathan Lange (jml) wrote :

Turns out this is because of this code in Python's unittest:

        if exctype is test.failureException:

And because we are raising MismatchErrors for most of our asserts.

Jonathan Lange (jml)
tags: added: stack
tags: added: traceback
removed: stack
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.