Skip to content
Snippets Groups Projects
Verified Commit a25c267f authored by David Runge's avatar David Runge :chipmunk: Committed by Levente Polyak
Browse files

Add more specific coverage configuration

pyproject.toml:
Set specific source for `toolscoverage.paths` (as we only provide one
module).
Set `tools.coverage.run.relative_files` to true (although it is still
bug riddled and does not seem to work as advertized in regards to xml
output: https://github.com/nedbat/coveragepy/issues/963,
https://github.com/nedbat/coveragepy/issues/1147).
Set `tool.coverage.xml.output`, so we don't have to provide it on the
commandline.

Makefile:
Do not provide an output file to the coverage xml call, as we do that in
configuration now.
parent 86eb172a
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@ fmt:
test:
coverage run
coverage report
coverage xml -o build/coverage.xml
coverage xml
build:
./keyringctl -v build
......
......@@ -17,8 +17,8 @@ exclude = '''
)/
'''
[tool.coverage.path]
source = "."
[tool.coverage.paths]
source = ["libkeyringctl"]
[tool.coverage.report]
omit = ["tests/*", ".tox/*"]
......@@ -29,6 +29,10 @@ show_missing = true
branch = true
command_line = "-m pytest --junit-xml=build/junit-report.xml -vv tests/"
omit = ["tests/*", ".tox/*"]
relative_files = true
[tool.coverage.xml]
output = "build/coverage.xml"
[tool.isort]
profile = "black"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment