Skip to content

Adding args to coverage report command #1487

Answered by jborbely
dralshehri asked this question in Q&A
Discussion options

You must be logged in to vote

If a feature similar to #1477 is approved, then yes, you could use

[envs.hatch-test]
reporting-args = ["--format=markdown"]

In the meantime, you could either add the following to your pyproject.toml file

[tool.coverage.report]
format = "markdown"

or if you use a .coveragerc file, the equivalent is

[report]
format = markdown

or redefine all of the hatch-test scripts

[envs.hatch-test.scripts]
run = "pytest{env:HATCH_TEST_ARGS:} {args}"
run-cov = "coverage run -m pytest{env:HATCH_TEST_ARGS:} {args}"
cov-combine = "coverage combine"
cov-report = "coverage report --format=markdown"

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dralshehri
Comment options

Answer selected by dralshehri
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants