1
0
mirror of https://github.com/django/django.git synced 2025-07-11 21:29:12 +00:00

Used coverage module in documentation.

This commit is contained in:
Paolo Melchiorre 2024-10-23 22:35:50 +02:00
parent 4d11ea1ef0
commit 1e98c107fe
No known key found for this signature in database
GPG Key ID: 5F8222398E1ED035
2 changed files with 5 additions and 5 deletions

View File

@ -375,19 +375,19 @@ To run coverage on the Django test suite using the standard test settings:
.. console:: .. 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: After running coverage, combine all coverage statistics by running:
.. console:: .. console::
$ coverage combine $ python -m coverage combine
After that generate the html report by running: After that generate the html report by running:
.. console:: .. console::
$ coverage html $ python -m coverage html
When running coverage for the Django tests, the included ``.coveragerc`` When running coverage for the Django tests, the included ``.coveragerc``
settings file defines ``coverage_html`` as the output directory for the report settings file defines ``coverage_html`` as the output directory for the report

View File

@ -867,14 +867,14 @@ following from your project folder containing ``manage.py``:
.. code-block:: shell .. 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 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: project. You can see a report of this data by typing following command:
.. code-block:: shell .. code-block:: shell
coverage report python -m coverage report
Note that some Django code was executed while running tests, but it is not 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. listed here because of the ``source`` flag passed to the previous command.