{% set ns = namespace(used_sections=[]) %} {% for test in tests %}
{% block test_title scoped %}
{{ test.status.word }}

{% block test_name scoped %} {% set name = test.item.nodeid.split('::')[1:]|join('::') %} {% set funcname, _, params = name.partition('[') %} {{ funcname }} {%- if params -%} [{{ params }} {% endif %} {% endblock %}

{{ test.phases|sum('report.duration')|timedelta }}
{% endblock %}
{% block test_content scoped %} {% if test.item.function.__doc__ %}
{{ test.item.function.__doc__|cleandoc|rst|safe }}
{% endif %} {% block test_metadata scoped %} {% for name, value in test.item.user_properties %} {% endfor %} {% set markers = test.item.iter_markers()|rejectattr('name', '==', 'parametrize')|list %} {% if markers %} {% endif %} {% if test.item.fixturenames %} {% endif %} {% for phase in test.phases %} {% for extra in phase.report.extra|default([]) %} {% endfor %} {% endfor %} {% endblock %} {% for phase in test.phases if phase.call.excinfo %}
{{ phase.call.excinfo.getrepr(style='no', chain=False) }}
{% endfor %}
{% for phase in test.phases %}
{% if phase.status.category %}
{% endif %}

{{ phase.report.when|title }}

{% if phase.report.longrepr %}
{{ phase.report.longreprtext }}
{% endif %} {% for section, content in phase.report.sections %} {# Need to remember which sections have already been reported as all previous sections for a single item get included in the next call. #} {% set section_id = content|id %} {% if section_id not in ns.used_sections %} {% set ns.used_sections = ns.used_sections + [section_id] %}
{{ section }}
{{ content|escape|replace('\r\n', '\n')|ansi|safe }}
{% endif %} {% endfor %}
{% endfor %}
{% endblock %}
{% endfor %}