From b2ebe1a59738c60b00f27bfeff2159a6edb4b94e Mon Sep 17 00:00:00 2001 From: tligui_y Date: Tue, 15 Jul 2025 11:52:23 +0200 Subject: [PATCH] Update json_to_md.py --- json_to_md.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/json_to_md.py b/json_to_md.py index 30eb1fec..28bccce6 100644 --- a/json_to_md.py +++ b/json_to_md.py @@ -6,6 +6,7 @@ import os import re import pytest from pytest import ExitCode +import traceback def stringify(obj): if obj is None or obj == "": @@ -64,10 +65,12 @@ def load_allure_metadata(allure_test_cases_dir): "severity": severity } print(f"Allure file: {file} loaded ✔️") - #except Exception as e: - # Juste le type d'exception, pas le détail - #print(f"Allure file: {file} failed ❌ (reason: {type(e).__name__})") - return allure_data + + + except Exception as e: + short_summary = traceback.format_exception_only(type(e), e)[-1].strip() + print(f"Allure file: {file} failed ❌ (reason: {short_summary})") + return allure_data def json_to_md_nested(json_path, md_path, allure_dir=None):