mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Fixed #20550 -- Added ability to preserve test db between runs
This commit is contained in:
parent
2e613ea5c5
commit
b7aa7c4ab4
10 changed files with 70 additions and 18 deletions
|
@ -1310,6 +1310,17 @@ The ``--liveserver`` option can be used to override the default address where
|
|||
the live server (used with :class:`~django.test.LiveServerTestCase`) is
|
||||
expected to run from. The default value is ``localhost:8081``.
|
||||
|
||||
.. django-admin-option:: --keepdb
|
||||
|
||||
.. versionadded:: 1.8
|
||||
|
||||
The ``--keepdb`` option can be used to preserve the test database between test
|
||||
runs. This has the advantage of skipping both the create and destroy actions
|
||||
which greatly decreases the time to run tests, especially those in a large
|
||||
test suite. If the test database does not exist, it will be created on the first
|
||||
run and then preserved for each subsequent run. Any unapplied migrations will also
|
||||
be applied to the test database before running the test suite.
|
||||
|
||||
testserver <fixture fixture ...>
|
||||
--------------------------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue