From a8a14b89c46f9ad3165959f52ce8ad448f2e6096 Mon Sep 17 00:00:00 2001 From: Gleb Nikonorov Date: Sun, 18 Oct 2020 15:13:10 -0400 Subject: [PATCH 1/2] Add a coverage report tox target --- tox.ini | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tox.ini b/tox.ini index a48cba33..f4c5659a 100644 --- a/tox.ini +++ b/tox.ini @@ -16,6 +16,15 @@ deps = ansi2html # soft-dependency commands = pytest -v -r a --color=yes --html={envlogdir}/report.html --self-contained-html {posargs} +[testenv:coverage] +deps = + ansi2html # soft-dependency + pytest-cov + pytest-mock + pytest-rerunfailures + pytest-xdist +commands = pytest -v -r a --color=yes --html={envlogdir}/report.html --self-contained-html --cov=pytest_html --cov-config={toxinidir}/.coveragerc testing/ {posargs} + [testenv:linting] skip_install = True basepython = python3 From eaef66c09b0e0a5de30d75b8b8fc7835cf698711 Mon Sep 17 00:00:00 2001 From: Gleb Nikonorov Date: Sun, 18 Oct 2020 15:15:17 -0400 Subject: [PATCH 2/2] add the missing coveragerc file --- .coveragerc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 00000000..e70d819e --- /dev/null +++ b/.coveragerc @@ -0,0 +1,15 @@ +[paths] +source = + ../pytest_html + */site-packages/pytest_html + +[run] +branch = true +parallel = true +source = + pytest_html + . + +[report] +show_missing = true +precision = 2