Update json_to_md.py
Run Pytest with Allure and Coverage Reports / tests (push) Successful in 50s
Run Pytest with Allure and Coverage Reports / deploy (push) Has been skipped

This commit is contained in:
2025-07-10 14:42:23 +02:00
parent 72a9dd9d9d
commit 156ab5307f
+6 -4
View File
@@ -29,7 +29,6 @@ def build_tree(collectors):
def write_tree(f, tree, path=""):
for name, content in tree.items():
if not isinstance(content, dict):
# On ignore les feuilles ou erreurs de structure
continue
full_path = f"{path}/{name}" if path else name
@@ -37,6 +36,7 @@ def write_tree(f, tree, path=""):
emoji = "" if outcome == "passed" else ""
f.write(f"<details>\n<summary>{emoji} `{full_path}`</summary>\n\n")
f.write(f"- **outcome:** `{outcome}`\n")
result = content.get("result")
@@ -53,10 +53,12 @@ def write_tree(f, tree, path=""):
else:
f.write("- **result:** `None`\n")
f.write("</details>\n\n")
# Appelle récursif pour les sous-dossiers
write_tree(f, content, full_path)
# 🔁 Appel récursif pour explorer les sous-dossiers
subdirs = {k: v for k, v in content.items() if isinstance(v, dict) and k not in ["outcome", "result"]}
if subdirs:
write_tree(f, subdirs, full_path)
f.write("</details>\n\n")
def stringify(obj):
if obj is None or obj == "":