summaryrefslogtreecommitdiff
path: root/docs/internals/contributing/writing-code/unit-tests.txt
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-11-16 09:12:26 -0500
committerTim Graham <timograham@gmail.com>2015-11-16 09:47:15 -0500
commit870914cb6cc88ac1bbd4384edf46082d857048f6 (patch)
tree55431177d9a3628e5ba61479dc079bebc405adb9 /docs/internals/contributing/writing-code/unit-tests.txt
parentb3389956c9cbc31e82137e787cfd339a3d1dab6f (diff)
[1.9.x] Documented how to see the full traceback of a test failure.
Backport of 21c82646fe3acf52251c1ecc618320657b97bd5e from master
Diffstat (limited to 'docs/internals/contributing/writing-code/unit-tests.txt')
-rw-r--r--docs/internals/contributing/writing-code/unit-tests.txt11
1 files changed, 9 insertions, 2 deletions
diff --git a/docs/internals/contributing/writing-code/unit-tests.txt b/docs/internals/contributing/writing-code/unit-tests.txt
index 4acaa78c51..6c758db2ea 100644
--- a/docs/internals/contributing/writing-code/unit-tests.txt
+++ b/docs/internals/contributing/writing-code/unit-tests.txt
@@ -276,6 +276,9 @@ cause any trouble::
$ ./runtests.py basic --reverse
+Seeing the SQL queries run during a test
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
If you wish to examine the SQL being run in failing tests, you can turn on
:ref:`SQL logging <django-db-logger>` using the ``--debug-sql`` option. If you
combine this with ``--verbosity=2``, all SQL queries will be output::
@@ -286,8 +289,12 @@ combine this with ``--verbosity=2``, all SQL queries will be output::
The ``--reverse`` and ``--debug-sql`` options were added.
-By default tests are run in parallel with one process per core. You can adjust
-this behavior with the ``--parallel`` option::
+Seeing the full traceback of a test failure
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+By default tests are run in parallel with one process per core. When the tests
+are run in parallel, however, you'll only see a truncated traceback for any
+test failures. You can adjust this behavior with the ``--parallel`` option::
$ ./runtests.py basic --parallel=1