From b5c1a85b50c709770b8e98aeecfeb8e81ca29dcf Mon Sep 17 00:00:00 2001 From: Marc Tamlyn Date: Sat, 10 Jan 2015 22:52:59 +0000 Subject: Fixed #24118 -- Added --debug-sql option for tests. Added a --debug-sql option for tests and runtests.py which outputs the SQL logger for failing tests. When combined with --verbosity=2, it also outputs the SQL for passing tests. Thanks to Berker, Tim, Markus, Shai, Josh and Anssi for review and discussion. --- docs/ref/django-admin.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'docs/ref') diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt index de556b28b7..570766f18d 100644 --- a/docs/ref/django-admin.txt +++ b/docs/ref/django-admin.txt @@ -1449,6 +1449,14 @@ This may help in debugging tests that aren't properly isolated and have side effects. :ref:`Grouping by test class ` is preserved when using this option. +.. django-admin-option:: --debug-sql + +.. versionadded:: 1.8 + +The ``--debug-sql`` option can be used to enable :ref:`SQL logging +` for failing tests. If :djadminopt:`--verbosity` is ``2``, +then queries in passing tests are also output. + testserver -------------------------------- -- cgit v1.3