Skip to content

Add tox target to generate coverage reports #2894

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 23, 2017
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ xml_output
public_*
private_*
.rope_project/
readthedocs/htmlcov
1 change: 1 addition & 0 deletions requirements/cov.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest-cov==2.5.1
11 changes: 11 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,14 @@ commands =
--profile-path={toxinidir} \
--profile=prospector \
--die-on-tool-error


[testenv:coverage]
deps =
-r{toxinidir}/requirements/pip.txt
-r{toxinidir}/requirements/cov.txt
Copy link
Member

@ericholscher ericholscher May 23, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Believe the pytest-cov dependency can be put here directly, instead of another file.

whitelist_externals = echo
commands =
py.test --disable-pytest-warnings \
--cov-report=term --cov-report=html --cov=. {posargs}
echo Annotated HTML coverage report is in {toxinidir}/readthedocs/htmlcov/index.html