Skip to content

Commit

Permalink
[3.1.x] Refs #25735 -- Added tags/exclude_tags arguments to DiscoverR…
Browse files Browse the repository at this point in the history
…unner docs.

Backport of 3704481 from main.
  • Loading branch information
felixxm committed Mar 19, 2021
1 parent 4a10c31 commit 11d241d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/topics/testing/advanced.txt
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ behavior. This class defines the ``run_tests()`` entry point, plus a
selection of other methods that are used by ``run_tests()`` to set up, 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, parallel=0, test_name_patterns=None, pdb=False, buffer=False, **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, parallel=0, tags=None, exclude_tags=None, test_name_patterns=None, pdb=False, buffer=False, **kwargs)

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

Expand Down Expand Up @@ -550,6 +550,13 @@ and tear down the test suite.
of processes accordingly. Each process gets its own database. This option
requires the third-party ``tblib`` package to display tracebacks correctly.

``tags`` can be used to specify a set of :ref:`tags for filtering tests
<topics-tagging-tests>`. May be combined with ``exclude_tags``.

``exclude_tags`` can be used to specify a set of
:ref:`tags for excluding tests <topics-tagging-tests>`. May be combined
with ``tags``.

If ``debug_sql`` is ``True``, failing test cases will output SQL queries
logged to the :ref:`django.db.backends logger <django-db-logger>` as well
as the traceback. If ``verbosity`` is ``2``, then queries in all tests are
Expand Down

0 comments on commit 11d241d

Please sign in to comment.