aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2012-01-03 17:43:27 +0100
committerMichał Górny <mgorny@gentoo.org>2012-01-03 17:43:27 +0100
commit395b59ef8051775eeaa3518cf2928ffd9d2cf92e (patch)
tree0edd892f9799a74e28fa10fe1978f8dc71e3aec1 /pmstestsuite/output/__init__.py
parentFix inherits in test cases. (diff)
downloadpms-test-suite-395b59ef8051775eeaa3518cf2928ffd9d2cf92e.tar.gz
pms-test-suite-395b59ef8051775eeaa3518cf2928ffd9d2cf92e.tar.bz2
pms-test-suite-395b59ef8051775eeaa3518cf2928ffd9d2cf92e.zip
Reraise test case exceptions neatly.
Diffstat (limited to 'pmstestsuite/output/__init__.py')
-rw-r--r--pmstestsuite/output/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pmstestsuite/output/__init__.py b/pmstestsuite/output/__init__.py
index 341fcd8..fcfd27e 100644
--- a/pmstestsuite/output/__init__.py
+++ b/pmstestsuite/output/__init__.py
@@ -2,6 +2,8 @@
# (c) 2011 Michał Górny <mgorny@gentoo.org>
# Released under the terms of the 2-clause BSD license.
+from traceback import format_exc
+
from gentoopm.util import ABCObject, BoolCompat
from abc import abstractmethod, abstractproperty
@@ -27,7 +29,7 @@ class TestResult(BoolCompat):
self._res = self._FAILURE
except Exception as e:
self._res = self._EXCEPT
- self._exc = e
+ self._exc = format_exc()
else:
self._res = self._SUCCESS
self._assert = t.pop_assertions()