{#
This file is part of Pynguin.

SPDX-FileCopyrightText: 2019–2022 Pynguin Contributors

SPDX-License-Identifier: LGPL-3.0-or-later
-#}
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Pynguin coverage report</title>
  <style>
{# Little hack to embed pygments css styles  #}
{{formatter(style="solarized-dark").get_style_defs('.highlight')}}

body{
    color: #c9d1d9;
    background: #0d1117;
    font-family: monospace;
    font-size: 16px;
}

td.lines span{
    display: block;
    padding-right: 8px;
    line-height: 125%;
}

.notCovered{
    border-right: 3px solid darkred;
}
.partiallyCovered{
    border-right: 3px solid orangered;
}
.fullyCovered{
    border-right: 3px solid darkgreen;
}
.notRelevant{
    border-right: 3px solid transparent;
}

</style>
</head>
<body>
<h1>Pynguin coverage report for module '{{cov_report.module}}'</h1>
<p>Achieved {{"{:.2%}".format(cov_report.branch_coverage)}} branch coverage.
<p>{{cov_report.branchless_code_objects.covered}}/{{cov_report.branchless_code_objects.existing}} branchless code objects covered.</p>
<p>{{cov_report.branches.covered}}/{{cov_report.branches.existing}} branches covered.</p>
  <table>
    <tbody>
        <tr>
            <td style="width: 40px; text-align: right;" class="lines">
                {% for line in cov_report.line_annotations -%}
                  {% if line.total.existing == 0 -%}
                    <span class="notRelevant">{{line.line_no}}</span>
                  {% elif line.total.covered == 0 -%}
                    <span class="notCovered" title="{{line.message()}}">{{line.line_no}}</span>
                  {% elif line.total.covered < line.total.existing -%}
                    <span class="partiallyCovered" title="{{line.message()}}">{{line.line_no}}</span>
                  {% else -%}
                    <span class="fullyCovered" title="{{line.message()}}">{{line.line_no}}</span>
                  {% endif -%}
                {% endfor -%}
            </td>
            <td style="width: 100%;">{{highlight("".join(cov_report.source), lexer(), formatter(style="solarized-dark"))}}</td>
        </tr>
    </tbody>
</table>
<footer>
  <p>Created at {{date}}</p>
</footer>
</body>
</html>
