1
0
Fork 0
forked from github/pelican

Show missing line numbers via invoke coverage

Also includes a change that causes this command to return a failing
status when coverage drops below its current value of 74.8%.
This commit is contained in:
Justin Mayer 2024-06-16 19:16:58 +02:00
commit fd955ba054

View file

@ -47,7 +47,11 @@ def tests(c):
@task
def coverage(c):
"""Generate code coverage of running the test suite."""
c.run(f"{VENV_BIN}/pytest --cov=pelican", pty=PTY)
c.run(
f"{VENV_BIN}/pytest --cov=pelican --cov-report term-missing "
"--cov-fail-under 74.8",
pty=PTY,
)
c.run(f"{VENV_BIN}/coverage html", pty=PTY)