From 218fc18c8e2459f6d1415bf5defa286828c23ee1 Mon Sep 17 00:00:00 2001 From: Frank Hoffmann <15r10nk-git@polarbit.de> Date: Fri, 25 Oct 2024 08:39:04 +0200 Subject: [PATCH] show exception traceback for debugging --- mutmut/__main__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mutmut/__main__.py b/mutmut/__main__.py index 89bd0b8d..1b778e9c 100644 --- a/mutmut/__main__.py +++ b/mutmut/__main__.py @@ -797,7 +797,7 @@ def orig_function_and_class_names_from_key(mutant_name): class_name = r[r.index(CLASS_NAME_SEPARATOR) + 1: r.rindex(CLASS_NAME_SEPARATOR)] r = r[r.rindex(CLASS_NAME_SEPARATOR) + 1:] else: - assert r.startswith('x_') + assert r.startswith('x_'),r r = r[2:] return r, class_name @@ -1544,7 +1544,9 @@ def load_thread(): if event.row_key.value == self.loading_id: diff_view.text = d except Exception as e: - diff_view.text = f'<{e}>' + import traceback + + diff_view.text = traceback.format_exc() t = Thread(target=load_thread) t.start()