forked from orbit-oss/flask
Expanding contribution documentation (#1883)
- README updated with link to CONTRIBUTING.rst - CONTRIBUTING.rst has instructions on running code coverage
This commit is contained in:
parent
e048aa4e19
commit
bbd6c8c791
2 changed files with 21 additions and 0 deletions
|
|
@ -68,3 +68,22 @@ of ``pytest``. You can install it with::
|
||||||
|
|
||||||
The ``tox`` command will then run all tests against multiple combinations
|
The ``tox`` command will then run all tests against multiple combinations
|
||||||
Python versions and dependency versions.
|
Python versions and dependency versions.
|
||||||
|
|
||||||
|
Running test coverage
|
||||||
|
---------------------
|
||||||
|
Generating a report of lines that do not have unit test coverage can indicate where
|
||||||
|
to start contributing. ``pytest`` integrates with ``coverage.py``, using the ``pytest-cov``
|
||||||
|
plugin. This assumes you have already run the testsuite (see previous section)::
|
||||||
|
|
||||||
|
pip install pytest-cov
|
||||||
|
|
||||||
|
After this has been installed, you can output a report to the command line using this command::
|
||||||
|
|
||||||
|
py.test --cov=flask tests/
|
||||||
|
|
||||||
|
Generate a HTML report can be done using this command::
|
||||||
|
|
||||||
|
py.test --cov-report html --cov=flask tests/
|
||||||
|
|
||||||
|
Full docs on ``coverage.py`` are here: https://coverage.readthedocs.io
|
||||||
|
|
||||||
|
|
|
||||||
2
README
2
README
|
|
@ -37,6 +37,8 @@
|
||||||
|
|
||||||
$ py.test
|
$ py.test
|
||||||
|
|
||||||
|
Details on contributing can be found in CONTRIBUTING.rst
|
||||||
|
|
||||||
~ Where can I get help?
|
~ Where can I get help?
|
||||||
|
|
||||||
Either use the #pocoo IRC channel on irc.freenode.net or
|
Either use the #pocoo IRC channel on irc.freenode.net or
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue