Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
0a2c8325
Commit
0a2c8325
authored
Mar 21, 2018
by
Paul Ganssle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add coverage generation to tox
parent
91b2c138
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
1 deletion
+25
-1
tests/requirements.txt
tests/requirements.txt
+2
-0
tox.ini
tox.ini
+23
-1
No files found.
tests/requirements.txt
View file @
0a2c8325
...
...
@@ -5,3 +5,5 @@ virtualenv>=13.0.0
pytest-virtualenv>=1.2.7
pytest>=3.0.2
wheel
coverage
pytest-cov
tox.ini
View file @
0a2c8325
...
...
@@ -6,6 +6,28 @@
[testenv]
deps
=
-rtests/requirements.txt
setenv
=
COVERAGE_FILE={toxworkdir}/.coverage.{envname}
passenv
=
APPDATA USERPROFILE HOMEDRIVE HOMEPATH windir APPVEYOR
commands
=
py.test {posargs}
# These are separate so xfail tests don't count towards code coverage
commands
=
pytest -m "not xfail" {posargs: "{toxinidir}" --cov-config={toxinidir}/tox.ini --cov=setuptools}
pytest
-m
"xfail"
{posargs:
"{toxinidir}"}
usedevelop
=
True
[testenv:coverage]
description
=
Combine coverage data and create reports
deps
=
coverage
skip_install
=
True
changedir
=
{toxworkdir}
setenv
=
COVERAGE_FILE=.coverage
commands
=
coverage erase
coverage
combine
coverage
report
--rcfile
=
{toxinidir}/tox.ini
coverage
xml
[coverage:run]
source
=
setuptools
[coverage:report]
skip_covered
=
True
show_missing
=
True
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment