Skip to content

Commit 7efb74e

Browse files
committed
tox: Add code coverage
Signed-off-by: Stephen Finucane <stephen@that.guru>
1 parent a4765d3 commit 7efb74e

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

test-requirements.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
mock==2.0.0
2-
pytest>3.6,<4.0
1+
mock~=3.0.0
2+
pytest>=4.0,<6.0;python_version>='3.5'
3+
pytest>=4.0,<5.0;python_version=='2.7'
4+
pytest-cov>=2.7,<3.0

tests/__init__.py

Whitespace-only changes.

tox.ini

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ basepython = python3
88
deps =
99
-r{toxinidir}/test-requirements.txt
1010
commands =
11-
pytest -Wall {posargs}
11+
pytest -Wall --cov=git_pw --cov-report term-missing {posargs}
1212

1313
[testenv:pep8]
1414
skip_install = true
@@ -23,6 +23,22 @@ deps=
2323
commands=
2424
mypy {posargs:--ignore-missing-imports --follow-imports=skip} git_pw
2525

26+
[testenv:report]
27+
skip_install = true
28+
deps =
29+
coverage
30+
commands =
31+
coverage report
32+
coverage html
33+
34+
[testenv:clean]
35+
envdir = {toxworkdir}/report
36+
skip_install = true
37+
deps =
38+
{[testenv:report]deps}
39+
commands =
40+
coverage erase
41+
2642
[testenv:docs]
2743
deps =
2844
-r{toxinidir}/docs/requirements.txt

0 commit comments

Comments
 (0)