pyproject: write XML coverage after running the testsuite.
This is particularly useful with IDEs that can display coverage in the editor, e.g. VS Code with the "Coverage Gutters" extension.
This commit is contained in:
parent
25c3531e93
commit
eef248a080
3 changed files with 4 additions and 2 deletions
|
|
@ -7,6 +7,6 @@ omit =
|
|||
|
||||
[report]
|
||||
exclude_lines =
|
||||
:nocov:
|
||||
:nocov:
|
||||
partial_branches =
|
||||
:nobr:
|
||||
|
|
|
|||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -12,6 +12,7 @@ __pycache__/
|
|||
# coverage
|
||||
/.coverage
|
||||
/htmlcov
|
||||
/coverage.xml
|
||||
|
||||
# tests
|
||||
/tests/spec_*/
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ examples = [
|
|||
[tool.pdm.scripts]
|
||||
_.env_file = ".env.toolchain"
|
||||
|
||||
test.composite = ["test-code", "test-docs"]
|
||||
test.composite = ["test-code", "test-docs", "coverage-xml"]
|
||||
test-code.env = {PYTHONWARNINGS = "error"}
|
||||
test-code.cmd = "python -m coverage run -m unittest discover -t . -s tests -v"
|
||||
test-docs.cmd = "sphinx-build -b doctest docs/ docs/_build"
|
||||
|
|
@ -94,3 +94,4 @@ document-linkcheck.cmd = "sphinx-build docs/ docs/_linkcheck/ -b linkcheck"
|
|||
|
||||
coverage-text.cmd = "python -m coverage report"
|
||||
coverage-html.cmd = "python -m coverage html"
|
||||
coverage-xml.cmd = "python -m coverage xml"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue