mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Fixed #28478 -- Make DiscoverRunner skip creating unused test databases.
SimpleTestCase.databases makes it possible to determine the set of databases required to run the discovered tests.
This commit is contained in:
parent
8c775391b7
commit
41e73de39d
8 changed files with 115 additions and 13 deletions
|
@ -614,7 +614,7 @@ utility methods in the ``django.test.utils`` module.
|
|||
Performs global post-test teardown, such as removing instrumentation from
|
||||
the template system and restoring normal email services.
|
||||
|
||||
.. function:: setup_databases(verbosity, interactive, keepdb=False, debug_sql=False, parallel=0, **kwargs)
|
||||
.. function:: setup_databases(verbosity, interactive, keepdb=False, debug_sql=False, parallel=0, aliases=None, **kwargs)
|
||||
|
||||
Creates the test databases.
|
||||
|
||||
|
@ -622,6 +622,14 @@ utility methods in the ``django.test.utils`` module.
|
|||
that have been made. This data will be provided to the
|
||||
:func:`teardown_databases` function at the conclusion of testing.
|
||||
|
||||
The ``aliases`` argument determines which :setting:`DATABASES` aliases test
|
||||
databases should be setup for. If it's not provided, it defaults to all of
|
||||
:setting:`DATABASES` aliases.
|
||||
|
||||
.. versionadded:: 2.2
|
||||
|
||||
The ``aliases`` argument was added.
|
||||
|
||||
.. function:: teardown_databases(old_config, parallel=0, keepdb=False)
|
||||
|
||||
Destroys the test databases, restoring pre-test conditions.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue