Skip to content

Commit

Permalink
Fix session duration when not finished yet
Browse files Browse the repository at this point in the history
  • Loading branch information
christiansandberg committed May 17, 2020
1 parent cf0143c commit b3f7c83
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pytest_reporter_html1/templates/html1/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@
{% endif %}
</td>
</tr>
<tr>
<th>Duration</th>
{% set duration = ended - started %}
<td>{{ duration|timedelta }}</td>
</tr>
{% if ended %}
<tr>
<th>Duration</th>
{% set duration = ended - started %}
<td>{{ duration|timedelta }}</td>
</tr>
{% endif %}
{% if config._metadata %}
{% for key, value in config._metadata.items() %}
<tr>
Expand Down

0 comments on commit b3f7c83

Please sign in to comment.