summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2021-03-18 11:41:24 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-03-19 08:09:46 +0100
commit4a10c312c7ff3945e77f9deab88f2bac5eb3794d (patch)
tree4d0bda68a3779fb2cccafef8aadcabb1194e8097 /docs
parentc528c710070cc20fb5f14d5d4d09a2d08c9685d2 (diff)
[3.1.x] Added parallel argument to DiscoverRunner docs.
Follow up to cd9fcd4e8073490a52c9e79133ada4661cb7db38. Backport of f099ef3ef53f88160d04d7dcc73859801b05a83e from main.
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/testing/advanced.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/docs/topics/testing/advanced.txt b/docs/topics/testing/advanced.txt
index 467a453cbe..7c0600ee7a 100644
--- a/docs/topics/testing/advanced.txt
+++ b/docs/topics/testing/advanced.txt
@@ -510,7 +510,7 @@ behavior. This class defines the ``run_tests()`` entry point, plus a
selection of other methods that are used by ``run_tests()`` to set up, execute
and tear down the test suite.
-.. class:: DiscoverRunner(pattern='test*.py', top_level=None, verbosity=1, interactive=True, failfast=False, keepdb=False, reverse=False, debug_mode=False, debug_sql=False, test_name_patterns=None, pdb=False, buffer=False, **kwargs)
+.. class:: DiscoverRunner(pattern='test*.py', top_level=None, verbosity=1, interactive=True, failfast=False, keepdb=False, reverse=False, debug_mode=False, debug_sql=False, parallel=0, test_name_patterns=None, pdb=False, buffer=False, **kwargs)
``DiscoverRunner`` will search for tests in any file matching ``pattern``.
@@ -544,6 +544,12 @@ and tear down the test suite.
``debug_mode`` specifies what the :setting:`DEBUG` setting should be
set to prior to running tests.
+ ``parallel`` specifies the number of processes. If ``parallel`` is greater
+ than ``1``, the test suite will run in ``parallel`` processes. If there are
+ fewer test cases than configured processes, Django will reduce the number
+ of processes accordingly. Each process gets its own database. This option
+ requires the third-party ``tblib`` package to display tracebacks correctly.
+
If ``debug_sql`` is ``True``, failing test cases will output SQL queries
logged to the :ref:`django.db.backends logger <django-db-logger>` as well
as the traceback. If ``verbosity`` is ``2``, then queries in all tests are