forked from github/pelican
Merge pull request #3225 from boxydog/test_coverage
This commit is contained in:
commit
fec78ebf33
2 changed files with 10 additions and 0 deletions
|
|
@ -75,6 +75,9 @@ via::
|
|||
|
||||
invoke tests
|
||||
|
||||
(For more on Invoke, see ``invoke -l`` to list tasks, or
|
||||
https://pyinvoke.org for documentation.)
|
||||
|
||||
In addition to running the test suite, it is important to also ensure that any
|
||||
lines you changed conform to code style guidelines. You can check that via::
|
||||
|
||||
|
|
|
|||
7
tasks.py
7
tasks.py
|
|
@ -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"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue