From c89dda4321174c6ce39fbc93e138c4937100d0d1 Mon Sep 17 00:00:00 2001 From: Fabio Zadrozny Date: Tue, 21 Feb 2017 15:28:54 -0300 Subject: [PATCH] Fix issue where pytestqt was hiding the information when there's an exception raised from another exception on Python 3 --- pytestqt/exceptions.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pytestqt/exceptions.py b/pytestqt/exceptions.py index ef02dbe2..d820cfd1 100644 --- a/pytestqt/exceptions.py +++ b/pytestqt/exceptions.py @@ -70,8 +70,7 @@ def format_captured_exceptions(exceptions): message = 'Qt exceptions in virtual methods:\n' message += '_' * 80 + '\n' for (exc_type, value, tback) in exceptions: - message += ''.join(traceback.format_tb(tback)) + '\n' - message += '%s: %s\n' % (exc_type.__name__, value) + message += ''.join(traceback.format_exception(exc_type, value, tback)) + '\n' message += '_' * 80 + '\n' return message