diff options
Diffstat (limited to 'docs/topics/testing')
| -rw-r--r-- | docs/topics/testing/advanced.txt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/docs/topics/testing/advanced.txt b/docs/topics/testing/advanced.txt index 7865056e31..c995d5ec5c 100644 --- a/docs/topics/testing/advanced.txt +++ b/docs/topics/testing/advanced.txt @@ -355,7 +355,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, execute and tear down the test suite. -.. class:: DiscoverRunner(pattern='test*.py', top_level=None, verbosity=1, interactive=True, failfast=True, keepdb=False, reverse=False, **kwargs) +.. class:: DiscoverRunner(pattern='test*.py', top_level=None, verbosity=1, interactive=True, failfast=True, keepdb=False, reverse=False, debug_sql=False, **kwargs) ``DiscoverRunner`` will search for tests in any file matching ``pattern``. @@ -386,6 +386,11 @@ execute and tear down the test suite. and have side effects. :ref:`Grouping by test class <order-of-tests>` is preserved when using this option. + 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 + output. + Django may, from time to time, extend the capabilities of the test runner by adding new arguments. The ``**kwargs`` declaration allows for this expansion. If you subclass ``DiscoverRunner`` or write your own test @@ -402,7 +407,7 @@ execute and tear down the test suite. subclassed test runner to add options to the list of command-line options that the :djadmin:`test` command could use. - The ``keepdb`` and the ``reverse`` arguments were added. + The ``keepdb``, ``reverse``, and ``debug_sql`` arguments were added. Attributes ~~~~~~~~~~ |
