Commit 23882e99 authored by Laurent Peuch's avatar Laurent Peuch
Browse files

feat(deprecated-warnings): add tests from which warnings are raised

parent e0b83af77166
Pipeline #21083 passed with stages
in 4 minutes and 4 seconds
......@@ -172,8 +172,14 @@ for key, value in all_artifacts.items():
if not file_content:
warning_content[2] = warning["file_content"]
if warning["category"] != "DeprecationWarning" and "full_warning" not in result[warning_text]:
result[warning_text]["full_warning"] = warning
if warning["category"] != "DeprecationWarning":
if "test_file" in warning and "/site-packages/" in warning["test_file"]:
warning["test_file"] = warning["test_file"].split("/site-packages/")[1]
result[warning_text]["projects"][key]["full_warning"] = warning
if "full_warning" not in result[warning_text]:
result[warning_text]["full_warning"] = warning
result[warning_text]["path"] = sorted(result[warning_text]["path"], key=lambda x: x[0])
......
......@@ -59,6 +59,11 @@
{%- endif -%}
{%- endfor -%}
)
{% if "full_warning" in project_data %}
<ul>
From at least this test: {{ project_data["full_warning"]["test_name"] }} (<a href="{{ project.web_url }}/-/blob/branch/default/{{ project_data["full_warning"]["test_file"] }}#L{{ project_data["full_warning"]["test_lineno"] + 1 }}" target="_blank">{{ project_data["full_warning"]["test_file"] }}:{{ project_data["full_warning"]["test_lineno"] + 1 }}</a>)
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment