123456789101112131415161718192021 |
- {%- import 'macros.tex' as macros %}
- \section{Test-Coverage}
- {% for module in coverage_information %}
- \subsection{ {\tt {{macros.latex_filter(module.name)}} }}
- The line coverage for {\tt {{macros.latex_filter(module.name)}} } was {{macros.latex_filter("%.1f" % module.line_coverage)}}\% {% if module.branch_coverage %}\\
- The branch coverage for {\tt {{macros.latex_filter(module.name)}} } was {{macros.latex_filter("%.1f" % module.branch_coverage)}}\%{% endif %}
- {% for py_file in module.files %}
- \subsubsection{ {\tt {{macros.latex_filter(py_file.name)}} }}
- The line coverage for {\tt {{macros.latex_filter(py_file.name)}} } was {{macros.latex_filter("%.1f" % py_file.line_coverage)}}\% {% if py_file.branch_coverage %}\\
- The branch coverage for {\tt {{macros.latex_filter(py_file.name)}} } was {{macros.latex_filter("%.1f" % py_file.branch_coverage)}}\%{% endif %}
- \vspace*{2.7ex}
- {%- for fragment in py_file.fragments %}
- \lstset{backgroundcolor=\color{bg-{{fragment.coverage_state}}}}\vspace*{-2.7ex}
- {%- if fragment.end is not none %}
- \lstinputlisting[language=Python, linerange={{fragment.start}}-{{fragment.end}}, firstnumber={{fragment.start}}]{{ "{" ~ py_file.filepath ~ "}" }}
- {%- else %}
- \lstinputlisting[language=Python, firstline={{fragment.start}}, firstnumber={{fragment.start}}]{{ "{" ~ py_file.filepath ~ "}" }}
- {%- endif %}
- {%- endfor %}
- {% endfor %}
- {% endfor %}
|