+6
-3
@@ -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"<br><span style='color: #888; font-size: 0.9em;'>(params: {param_display})</span>"
|
||||
|
||||
# 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" </details>\n\n"
|
||||
)
|
||||
|
||||
|
||||
def json_to_md_nested(json_path, md_path, runtime_params=None):
|
||||
with open(json_path) as f:
|
||||
|
||||
Reference in New Issue
Block a user