Refs #31621 -- Fixed handling --parallel option in test management command and runtests.py.

Regression in ae89daf46f.
Thanks Tim Graham for the report.
This commit is contained in:
Mariusz Felisiak 2021-08-04 10:49:30 +02:00
parent c2a5735d86
commit 36714be874
6 changed files with 72 additions and 47 deletions

View file

@ -1470,9 +1470,8 @@ multiple cores, this allows running tests significantly faster.
Using ``--parallel`` without a value, or with the value ``auto``, runs one test
process per core according to :func:`multiprocessing.cpu_count()`. You can
override this by passing the desired number of processes, e.g.
``--parallel 4``. You can also enable ``--parallel`` without passing the flag
by setting the :envvar:`DJANGO_TEST_PROCESSES` environment variable to the
desired number of processes.
``--parallel 4``, or by setting the :envvar:`DJANGO_TEST_PROCESSES` environment
variable.
Django distributes test cases — :class:`unittest.TestCase` subclasses — to
subprocesses. If there are fewer test cases than configured processes, Django