Python Library Unittest
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

report.tex 1.4KB

123456789101112131415161718192021
  1. {%- import 'macros.tex' as macros %}
  2. \section{Test-Coverage}
  3. {% for module in coverage_information %}
  4. \subsection{ {\tt {{macros.latex_filter(module.name)}} }}
  5. The line coverage for {\tt {{macros.latex_filter(module.name)}} } was {{macros.latex_filter("%.1f" % module.line_coverage)}}\% {% if module.branch_coverage %}\\
  6. The branch coverage for {\tt {{macros.latex_filter(module.name)}} } was {{macros.latex_filter("%.1f" % module.branch_coverage)}}\%{% endif %}
  7. {% for py_file in module.files %}
  8. \subsubsection{ {\tt {{macros.latex_filter(py_file.name)}} }}
  9. 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 %}\\
  10. The branch coverage for {\tt {{macros.latex_filter(py_file.name)}} } was {{macros.latex_filter("%.1f" % py_file.branch_coverage)}}\%{% endif %}
  11. \vspace*{2.7ex}
  12. {%- for fragment in py_file.fragments %}
  13. \lstset{backgroundcolor=\color{bg-{{fragment.coverage_state}}}}\vspace*{-2.7ex}
  14. {%- if fragment.end is not none %}
  15. \lstinputlisting[language=Python, linerange={{fragment.start}}-{{fragment.end}}, firstnumber={{fragment.start}}]{{ "{" ~ py_file.filepath ~ "}" }}
  16. {%- else %}
  17. \lstinputlisting[language=Python, firstline={{fragment.start}}, firstnumber={{fragment.start}}]{{ "{" ~ py_file.filepath ~ "}" }}
  18. {%- endif %}
  19. {%- endfor %}
  20. {% endfor %}
  21. {% endfor %}