Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/user_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ Modifying the results table

You can modify the columns of the report by implementing custom hooks for the header and rows.
The following example :code:`conftest.py` adds a description column with the test function docstring,
adds a sortable time column, and removes the links column:
adds a sortable approximate end-time column (populated when the result row is
created), and removes the links column:

.. code-block:: python

Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,6 @@ warn_unused_configs = true

[tool.djlint]
profile = "jinja"
ignore = "H005,H016,H030,H031,H006,H013"
# H056/H057: the media <img>/<source> src is intentionally empty (populated at
# runtime by report.js), and the <video> has no caption source to track.
ignore = "H005,H016,H030,H031,H006,H013,H056,H057"
6 changes: 3 additions & 3 deletions src/pytest_html/resources/index.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<meta charset="utf-8"/>
<title id="head-title">{{ title }}</title>
{%- if self_contained %}
<style type="text/css">
<style>
{{- styles|safe }}
</style>
{% else %}
<link href="{{ styles }}" rel="stylesheet" type="text/css"/>
<link href="{{ styles }}" rel="stylesheet"/>
{%- endif %}
</head>
<body>
Expand Down Expand Up @@ -87,7 +87,7 @@
{%- endfor %}
</div>
<div class="collapse">
<button id="show_all_details">Show all details</button>&nbsp;/&nbsp;<button id="hide_all_details">Hide all details</button>
<button id="show_all_details" type="button">Show all details</button>&nbsp;/&nbsp;<button id="hide_all_details" type="button">Hide all details</button>
</div>
</div>
</div>
Expand Down