mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Used coverage module in documentation.
This commit is contained in:
parent
4d11ea1ef0
commit
1e98c107fe
@ -375,19 +375,19 @@ To run coverage on the Django test suite using the standard test settings:
|
||||
|
||||
.. console::
|
||||
|
||||
$ coverage run ./runtests.py --settings=test_sqlite
|
||||
$ python -m coverage run ./runtests.py --settings=test_sqlite
|
||||
|
||||
After running coverage, combine all coverage statistics by running:
|
||||
|
||||
.. console::
|
||||
|
||||
$ coverage combine
|
||||
$ python -m coverage combine
|
||||
|
||||
After that generate the html report by running:
|
||||
|
||||
.. console::
|
||||
|
||||
$ coverage html
|
||||
$ python -m coverage html
|
||||
|
||||
When running coverage for the Django tests, the included ``.coveragerc``
|
||||
settings file defines ``coverage_html`` as the output directory for the report
|
||||
|
@ -867,14 +867,14 @@ following from your project folder containing ``manage.py``:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
coverage run --source='.' manage.py test myapp
|
||||
python -m coverage run --source='.' -m manage test myapp
|
||||
|
||||
This runs your tests and collects coverage data of the executed files in your
|
||||
project. You can see a report of this data by typing following command:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
coverage report
|
||||
python -m coverage report
|
||||
|
||||
Note that some Django code was executed while running tests, but it is not
|
||||
listed here because of the ``source`` flag passed to the previous command.
|
||||
|
Loading…
Reference in New Issue
Block a user