diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-03-18 12:06:05 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-03-19 08:11:22 +0100 |
| commit | 11d241dcf78842764fc3d0feac1a0b2bd78aa398 (patch) | |
| tree | 01f37835eff9ba558d261f6c05972fe7a7a85c64 /docs | |
| parent | 4a10c312c7ff3945e77f9deab88f2bac5eb3794d (diff) | |
[3.1.x] Refs #25735 -- Added tags/exclude_tags arguments to DiscoverRunner docs.
Backport of 37044817f9a57126d655f216019e8c8cca7c151b from main.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/testing/advanced.txt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/docs/topics/testing/advanced.txt b/docs/topics/testing/advanced.txt index 7c0600ee7a..b98cb67341 100644 --- a/docs/topics/testing/advanced.txt +++ b/docs/topics/testing/advanced.txt @@ -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``. @@ -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 |
