Too much stack shown on re-raised exceptions

Bug #906266 reported by Jonathan Lange
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
testtools
Triaged
Wishlist
Unassigned

Bug Description

I just got this from an assertRaises failure:

======================================================================
ERROR: tests.test_database.TestDatabase.test_double_insert
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jml/src/pkgme-binary/use-description/devportalbinary/tests/test_database.py", line 55, in test_double_insert
    db.insert_new_library, 'foo-src', 'libfoo.so.0', 'foo')
  File "/home/jml/src/testtools/trunk/testtools/testcase.py", line 389, in assertRaises
    self.assertThat(lambda: callableObj(*args, **kwargs), matcher)
  File "/home/jml/src/testtools/trunk/testtools/testcase.py", line 401, in assertThat
    mismatch = matcher.match(matchee)
  File "/home/jml/src/testtools/trunk/testtools/matchers.py", line 798, in match
    mismatch = self.exception_matcher.match(exc_info)
  File "/home/jml/src/testtools/trunk/testtools/matchers.py", line 546, in match
    mismatch = matcher.match(matchee)
  File "/home/jml/src/testtools/trunk/testtools/testcase.py", line 380, in match
    reraise(*matchee)
  File "/home/jml/src/testtools/trunk/testtools/matchers.py", line 791, in match
    result = matchee()
  File "/home/jml/src/testtools/trunk/testtools/testcase.py", line 389, in <lambda>
    self.assertThat(lambda: callableObj(*args, **kwargs), matcher)
  File "devportalbinary/database.py", line 338, in insert_new_library
    (unicode(source_package_name), unicode(library_name), unicode(dependency)))
  File "/usr/lib/python2.7/dist-packages/storm/store.py", line 108, in execute
    return self._connection.execute(statement, params, noresult)
  File "/usr/lib/python2.7/dist-packages/storm/database.py", line 238, in execute
    raw_cursor = self.raw_execute(statement, params)
  File "/usr/lib/python2.7/dist-packages/storm/databases/sqlite.py", line 154, in raw_execute
    return Connection.raw_execute(self, statement, params)
  File "/usr/lib/python2.7/dist-packages/storm/database.py", line 322, in raw_execute
    self._check_disconnect(raw_cursor.execute, *args)
  File "/usr/lib/python2.7/dist-packages/storm/database.py", line 371, in _check_disconnect
    return function(*args, **kwargs)
IntegrityError: columns source_package_name, library, dependency are not unique
Ran 64 tests in 10.907s (+0.235s)

Most of that stack is irrelevant to the test at hand, and is only valuable for debugging testtools itself. It should not be shown to end users by default.

Tags: traceback
Jonathan Lange (jml)
tags: added: traceback
Changed in testtools:
status: New → Triaged
importance: Undecided → Wishlist
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.