summaryrefslogtreecommitdiff
path: root/docs/internals/contributing/writing-code/unit-tests.txt
diff options
context:
space:
mode:
authorwrwrwr <git@wr.waw.pl>2014-11-22 17:59:05 +0100
committerTim Graham <timograham@gmail.com>2014-11-24 19:24:11 -0500
commite22c64dfc0230134c0e9d9ae1d9a5c1589fc8b6e (patch)
tree392a0fda9c438eeb3d2c48c3130c149d3db63d3f /docs/internals/contributing/writing-code/unit-tests.txt
parentca801b8c8f7022cd9334a89ac9ae03f586650234 (diff)
Fixed #23742 -- Added an option to reverse tests order.
This is useful for debugging side effects affecting tests that are usually executed before a given test. Full suite and pair tests sort cases more or less deterministically, thus some test cross-dependencies are easier to reveal by reversing the order. Thanks Preston Timmons for the review.
Diffstat (limited to 'docs/internals/contributing/writing-code/unit-tests.txt')
-rw-r--r--docs/internals/contributing/writing-code/unit-tests.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/internals/contributing/writing-code/unit-tests.txt b/docs/internals/contributing/writing-code/unit-tests.txt
index 286fd36f9c..2497c5e65a 100644
--- a/docs/internals/contributing/writing-code/unit-tests.txt
+++ b/docs/internals/contributing/writing-code/unit-tests.txt
@@ -307,3 +307,15 @@ the first one:
.. code-block:: bash
$ ./runtests.py --pair basic.tests.ModelTest.test_eq queries transactions
+
+You can also try running any set of tests in reverse using the ``--reverse``
+option in order to verify that executing tests in a different order does not
+cause any trouble:
+
+.. code-block:: bash
+
+ $ ./runtests.py basic --reverse
+
+.. versionadded:: 1.8
+
+ The ``--reverse`` option was added.