Update json_to_md.py
Run Pytest with HTML and XML Test Reports / tests (push) Successful in 25s

This commit is contained in:
2025-07-17 15:49:24 +02:00
parent 7fcf09393e
commit c98fda6d67
+2 -2
View File
@@ -12,7 +12,7 @@ def stringify(obj, indent=0):
space = ' ' * indent
if obj is None or obj == "":
return "None"
return "[]"
elif isinstance(obj, (int, float, str, bool)):
return str(obj)
elif isinstance(obj, list):
@@ -52,7 +52,6 @@ def normalize_nodeid(nodeid):
def get_details_block(summary, body, level=0, params_str=None):
margin = 18 * level
border = f"border-left: 2px solid #eee;" if level > 0 else ""
# Affiche les paramètres dans le résumé si présent
if params_str:
summary = f"{summary} <span style='color: #888; font-size: 0.9em;'>parameters: [{params_str}]</span>"
return (f'<div style="margin-left: {margin}px; {border} padding-left: 8px;">\n'
@@ -222,6 +221,7 @@ def json_to_md_nested(json_path, md_path, runtime_params=None):
folder_body += get_details_block(f"{emoji} {short_node}", body_coll, level=2)
f.write(get_details_block(f"{folder_emoji} {folder} ({len(collectors)} tests)", folder_body + body_collectors, level=1))
# ---------- OTHER sections -----------
EXCLUDED_KEYS = {'tests', 'collectors'}
keys = list(data.keys())