diff --git a/tests/plugins.py b/tests/plugins.py index 90c5c0d99..4e7af97ae 100644 --- a/tests/plugins.py +++ b/tests/plugins.py @@ -97,6 +97,8 @@ def finalize(self, result): def formatErr(self, err): exctype, value, tb = err + if not isinstance(value, exctype): + value = exctype(value) return ''.join(traceback.format_exception(exctype, value, tb)) def startContext(self, ctx):