mirror of
https://github.com/django/django.git
synced 2025-07-24 05:36:15 +00:00
Restored multiprocessing concurrency on coverage.py settings
* Revert "Reverted "Fixed #33213 -- Doc'd testing code coverage in parallel and used it.""
This reverts commit 78da5ca0c1
.
* Restored coverage multiprocess concurrency with threads
Investigating https://github.com/nedbat/coveragepy/issues/1585 revealed
that thread tracing gets disabled when passing
`concurrency = multiprocessing`. Adding `thread` restores it, and
ensures that the `auser()` is reported as covered since the test suite
uses `AsyncToSync` to execute this middleware (which spawns threads).
This commit is contained in:
parent
5c456a8793
commit
070cbac0db
3 changed files with 12 additions and 5 deletions
|
@ -337,14 +337,19 @@ Contributors are encouraged to run coverage on the test suite to identify areas
|
|||
that need additional tests. The coverage tool installation and use is described
|
||||
in :ref:`testing code coverage<topics-testing-code-coverage>`.
|
||||
|
||||
Coverage should be run in a single process to obtain accurate statistics. To
|
||||
run coverage on the Django test suite using the standard test settings:
|
||||
To run coverage on the Django test suite using the standard test settings:
|
||||
|
||||
.. console::
|
||||
|
||||
$ coverage run ./runtests.py --settings=test_sqlite --parallel=1
|
||||
$ coverage run ./runtests.py --settings=test_sqlite
|
||||
|
||||
After running coverage, generate the html report by running:
|
||||
After running coverage, combine all coverage statistics by running:
|
||||
|
||||
.. console::
|
||||
|
||||
$ coverage combine
|
||||
|
||||
After that generate the html report by running:
|
||||
|
||||
.. console::
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue