Add a "coverage" task to generate a coverage report

Add a one-liner about "invoke" in docs.
This commit is contained in:
boxydog 2023-10-28 17:01:33 -05:00
commit 3a6ae72333
2 changed files with 10 additions and 0 deletions

View file

@ -44,6 +44,13 @@ def tests(c):
c.run(f"{VENV_BIN}/pytest", pty=PTY)
@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}/coverage html", pty=PTY)
@task
def black(c, check=False, diff=False):
"""Run Black auto-formatter, optionally with --check or --diff"""