diff --git a/json_to_md.py b/json_to_md.py index b3ec8f83d..4d9348ebc 100644 --- a/json_to_md.py +++ b/json_to_md.py @@ -239,6 +239,16 @@ def json_to_md_nested(json_path, md_path, allure_dir=None): f.write("\n\n") + if 'warnings' in data and data['warnings']: + f.write("## ⚠️ Warnings\n\n") + for i, warning in enumerate(data['warnings'], 1): + f.write(f"
\nWarning #{i}\n\n") + f.write("```\n") + for k, v in warning.items(): + f.write(f"{k}: {v}\n") + f.write("```\n") + f.write("
\n\n") + def run_pytest_and_generate_banner_with_logs(md_path, log_path): exit_code = pytest.main(["tests/"])