summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2015-09-06 11:12:08 +0200
committerAymeric Augustin <aymeric.augustin@m4x.org>2015-09-10 13:34:05 +0200
commit33c7c2a55770fe8ccc297a8ae13e04487b72b3a1 (patch)
treef3cd4f169ae8cea6d0b060af3800968e7fd05617 /docs
parent39bb66baad1b98e0fa10d668a09154a0f5372b3d (diff)
Enabled parallel testing by default in runtests.py.
Diffstat (limited to 'docs')
-rw-r--r--docs/internals/contributing/writing-code/unit-tests.txt13
-rw-r--r--docs/releases/1.9.txt7
2 files changed, 19 insertions, 1 deletions
diff --git a/docs/internals/contributing/writing-code/unit-tests.txt b/docs/internals/contributing/writing-code/unit-tests.txt
index 8a097bba8c..55e3a2d5c7 100644
--- a/docs/internals/contributing/writing-code/unit-tests.txt
+++ b/docs/internals/contributing/writing-code/unit-tests.txt
@@ -284,3 +284,16 @@ combine this with ``--verbosity=2``, all SQL queries will be output::
.. versionadded:: 1.8
The ``--reverse`` and ``--debug-sql`` options were added.
+
+By default tests are run in parallel with one process per core. You can adjust
+this behavior with the ``--parallel`` option::
+
+ $ ./runtests.py basic --parallel=1
+
+You can also use the ``DJANGO_TEST_PROCESSES`` environment variable for this
+purpose.
+
+.. versionadded:: 1.9
+
+ Support for running tests in parallel and the ``--parallel`` option were
+ added.
diff --git a/docs/releases/1.9.txt b/docs/releases/1.9.txt
index 99b6e44bc3..41e7701e99 100644
--- a/docs/releases/1.9.txt
+++ b/docs/releases/1.9.txt
@@ -135,6 +135,10 @@ Each process gets its own database. You must ensure that different test cases
don't access the same resources. For instance, test cases that touch the
filesystem should create a temporary directory for their own use.
+This option is enabled by default for Django's own test suite on database
+backends that support it (this is all the built-in backends except for
+Oracle).
+
Minor features
~~~~~~~~~~~~~~
@@ -686,7 +690,8 @@ Database backend API
and hasn't been called anywhere in Django's code or tests.
* In order to support test parallelization, you must implement the
- ``DatabaseCreation._clone_test_db()`` method. You may have to adjust
+ ``DatabaseCreation._clone_test_db()`` method and set
+ ``DatabaseFeatures.can_clone_databases = True``. You may have to adjust
``DatabaseCreation.get_test_db_clone_settings()``.
Default settings that were tuples are now lists