diff options
| author | Jonathan Lange <jml@canonical.com> | 2010-10-15 16:34:50 +0100 |
|---|---|---|
| committer | Jonathan Lange <jml@canonical.com> | 2010-10-15 16:34:50 +0100 |
| commit | 27555f76cf2e00bbf2d47eecd7e9b551b0af8cce (patch) | |
| tree | d5cf14babd0272925d278b410a2e7698c89800d3 /testtools/runtest.py | |
| parent | a3b57b97cf8db4dc82eacdec3fca5f509c64c799 (diff) | |
| parent | df2c7703772f8b90403ac5151892df94ccad9a8b (diff) | |
| download | testtools-27555f76cf2e00bbf2d47eecd7e9b551b0af8cce.tar.gz | |
Merge in recent changes from trunk.
Diffstat (limited to 'testtools/runtest.py')
| -rw-r--r-- | testtools/runtest.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/testtools/runtest.py b/testtools/runtest.py index 665538c..779cdbc 100644 --- a/testtools/runtest.py +++ b/testtools/runtest.py @@ -148,8 +148,11 @@ class RunTest(object): def _got_user_exception(self, exc_info): """Called when user code raises an exception.""" - e = exc_info[1] - self.case.onException(exc_info) + try: + e = exc_info[1] + self.case.onException(exc_info) + finally: + del exc_info for exc_class, handler in self.handlers: if isinstance(e, exc_class): self._exceptions.append(e) |
