diff --git a/json_to_md.py b/json_to_md.py index e751b58e8..40e3b0868 100644 --- a/json_to_md.py +++ b/json_to_md.py @@ -76,20 +76,22 @@ def make_test_block(test, status, emoji, level, runtime_params): callspec = runtime_params.get(nodeid, {}) params = callspec.get("params", {}) if isinstance(callspec, dict) else {} + # Résumé du test summary = f"{emoji} Test {test['global_number']}" if params: param_display = ", ".join(f"{k}={sanitize_param_value(v)}" for k, v in params.items()) summary += f"
(params: {param_display})" + # Ajouter les runtime parameters avant les autres phases body = "" - if callspec: block = f"```python\n{stringify(callspec)}\n```" body += f"**📌 Runtime Parameters**\n\n{block}\n\n" - + + # Parcours des phases du test skip_keys = {"nodeid", "global_number"} for phase in [k for k in test if isinstance(test[k], dict) and k not in skip_keys]: - body += f"**_*{phase.capitalize()} phase*_**\n\n" + body += f"**_*📌 {phase.capitalize()} phase*_**\n\n" for field, value in test[phase].items(): block = stringify(value) body += f"**{field}:**\n\n```python\n{block}\n```\n\n" @@ -103,6 +105,7 @@ def make_test_block(test, status, emoji, level, runtime_params): f"{body_content}\n" f" \n\n" ) + def json_to_md_nested(json_path, md_path, runtime_params=None): with open(json_path) as f: