Skip to content

Commit e645b79

Browse files
committed
Added missing docs to DiscoverRunner for keepdb option; refs #20550.
1 parent ca48cef commit e645b79

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docs/topics/testing/advanced.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ behavior. This class defines the ``run_tests()`` entry point, plus a
309309
selection of other methods that are used to by ``run_tests()`` to set up,
310310
execute and tear down the test suite.
311311

312-
.. class:: DiscoverRunner(pattern='test*.py', top_level=None, verbosity=1, interactive=True, failfast=True, **kwargs)
312+
.. class:: DiscoverRunner(pattern='test*.py', top_level=None, verbosity=1, interactive=True, failfast=True, keepdb=False **kwargs)
313313

314314
``DiscoverRunner`` will search for tests in any file matching ``pattern``.
315315

@@ -331,6 +331,10 @@ execute and tear down the test suite.
331331
If ``failfast`` is ``True``, the test suite will stop running after the
332332
first test failure is detected.
333333

334+
If ``keepdb`` is ``True``, the test suite will use the existing database,
335+
or create one if necessary. If ``False``, a new database will be created,
336+
prompting the user to remove the existing one, if present.
337+
334338
Django may, from time to time, extend the capabilities of the test runner
335339
by adding new arguments. The ``**kwargs`` declaration allows for this
336340
expansion. If you subclass ``DiscoverRunner`` or write your own test
@@ -347,6 +351,8 @@ execute and tear down the test suite.
347351
subclassed test runner to add options to the list of command-line
348352
options that the :djadmin:`test` command could use.
349353

354+
The ``keepdb`` argument was added.
355+
350356
Attributes
351357
~~~~~~~~~~
352358

0 commit comments

Comments
 (0)