mirror of https://github.com/django/django.git
[3.1.x] Refs #30676 -- Added pdb argument to DiscoverRunner docs.
Backport of 2c43840dfb
from master
This commit is contained in:
parent
fb9add3c7d
commit
33457aa3cf
|
@ -510,7 +510,7 @@ behavior. This class defines the ``run_tests()`` entry point, plus a
|
||||||
selection of other methods that are used to by ``run_tests()`` to set up,
|
selection of other methods that are used to by ``run_tests()`` to set up,
|
||||||
execute and tear down the test suite.
|
execute and tear down the test suite.
|
||||||
|
|
||||||
.. class:: DiscoverRunner(pattern='test*.py', top_level=None, verbosity=1, interactive=True, failfast=False, keepdb=False, reverse=False, debug_mode=False, debug_sql=False, test_name_patterns=None, **kwargs)
|
.. class:: DiscoverRunner(pattern='test*.py', top_level=None, verbosity=1, interactive=True, failfast=False, keepdb=False, reverse=False, debug_mode=False, debug_sql=False, test_name_patterns=None, pdb=False, **kwargs)
|
||||||
|
|
||||||
``DiscoverRunner`` will search for tests in any file matching ``pattern``.
|
``DiscoverRunner`` will search for tests in any file matching ``pattern``.
|
||||||
|
|
||||||
|
@ -552,6 +552,9 @@ execute and tear down the test suite.
|
||||||
``test_name_patterns`` can be used to specify a set of patterns for
|
``test_name_patterns`` can be used to specify a set of patterns for
|
||||||
filtering test methods and classes by their names.
|
filtering test methods and classes by their names.
|
||||||
|
|
||||||
|
If ``pdb`` is ``True``, a debugger (``pdb`` or ``ipdb``) will be spawned at
|
||||||
|
each test error or failure.
|
||||||
|
|
||||||
Django may, from time to time, extend the capabilities of the test runner
|
Django may, from time to time, extend the capabilities of the test runner
|
||||||
by adding new arguments. The ``**kwargs`` declaration allows for this
|
by adding new arguments. The ``**kwargs`` declaration allows for this
|
||||||
expansion. If you subclass ``DiscoverRunner`` or write your own test
|
expansion. If you subclass ``DiscoverRunner`` or write your own test
|
||||||
|
@ -562,6 +565,10 @@ execute and tear down the test suite.
|
||||||
custom arguments by calling ``parser.add_argument()`` inside the method, so
|
custom arguments by calling ``parser.add_argument()`` inside the method, so
|
||||||
that the :djadmin:`test` command will be able to use those arguments.
|
that the :djadmin:`test` command will be able to use those arguments.
|
||||||
|
|
||||||
|
.. versionadded:: 3.0
|
||||||
|
|
||||||
|
The ``pdb`` argument was added.
|
||||||
|
|
||||||
Attributes
|
Attributes
|
||||||
~~~~~~~~~~
|
~~~~~~~~~~
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue