Commit 33c7c2a5 authored by Aymeric Augustin's avatar Aymeric Augustin
Browse files

Enabled parallel testing by default in runtests.py.

parent 39bb66ba
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -212,6 +212,10 @@ class BaseDatabaseFeatures(object):
    # every expression is null?
    greatest_least_ignores_nulls = False

    # Can the backend clone databases for parallel test execution?
    # Defaults to False to allow third-party backends to opt-in.
    can_clone_databases = False

    def __init__(self, connection):
        self.connection = connection

+1 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
    can_release_savepoints = True
    atomic_transactions = False
    supports_column_check_constraints = False
    can_clone_databases = True

    @cached_property
    def _mysql_storage_engine(self):
+1 −0
Original line number Diff line number Diff line
@@ -28,3 +28,4 @@ class DatabaseFeatures(BaseDatabaseFeatures):
    has_case_insensitive_like = False
    requires_sqlparse_for_splitting = False
    greatest_least_ignores_nulls = True
    can_clone_databases = True
+1 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
    can_rollback_ddl = True
    supports_paramstyle_pyformat = False
    supports_sequence_reset = False
    can_clone_databases = True

    @cached_property
    def uses_savepoints(self):
+13 −0
Original line number Diff line number Diff line
@@ -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.
Loading