Skip to content

Commit

Permalink
Add more specific coverage configuration
Browse files Browse the repository at this point in the history
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: nedbat/coveragepy#963,
nedbat/coveragepy#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.
  • Loading branch information
dvzrv authored and anthraxx committed Nov 29, 2021
1 parent dbd2d4a commit 61a8840
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -17,7 +17,7 @@ fmt:
test:
coverage run
coverage report
coverage xml -o build/coverage.xml
coverage xml

build:
./keyringctl -v build
Expand Down
8 changes: 6 additions & 2 deletions pyproject.toml
Expand Up @@ -17,8 +17,8 @@ exclude = '''
)/
'''

[tool.coverage.path]
source = "."
[tool.coverage.paths]
source = ["libkeyringctl"]

[tool.coverage.report]
omit = ["tests/*", ".tox/*"]
Expand All @@ -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"
Expand Down

0 comments on commit 61a8840

Please sign in to comment.