summaryrefslogtreecommitdiff
path: root/docs/topics
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2013-09-10 09:49:39 -0400
committerTim Graham <timograham@gmail.com>2013-09-10 09:49:39 -0400
commit4ba373840a7b299fff4a7bcc1001e32dffceee86 (patch)
tree8698de270fc3195ab907c51d805118f2a1d168f2 /docs/topics
parentfca4c4826e7b4cec84c3f8140bb929e38eea962c (diff)
Fixed #16534 -- Improved ability to customize DiscoverRunner
Added DiscoverRunner.test_suite and .test_runner attributes. Thanks tomchristie for the suggestion and jcd for the patch.
Diffstat (limited to 'docs/topics')
-rw-r--r--docs/topics/testing/advanced.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/topics/testing/advanced.txt b/docs/topics/testing/advanced.txt
index a4c425aeb9..d02912dd31 100644
--- a/docs/topics/testing/advanced.txt
+++ b/docs/topics/testing/advanced.txt
@@ -338,6 +338,25 @@ execute and tear down the test suite.
Attributes
~~~~~~~~~~
+.. attribute:: DiscoverRunner.test_suite
+
+ .. versionadded:: 1.7
+
+ The class used to build the test suite. By default it is set to
+ ``unittest.TestSuite``. This can be overridden if you wish to implement
+ different logic for collecting tests.
+
+.. attribute:: DiscoverRunner.test_runner
+
+ .. versionadded:: 1.7
+
+ This is the class of the low-level test runner which is used to execute
+ the individual tests and format the results. By default it is set to
+ ``unittest.TextTestRunner``. Despite the unfortunate similarity in
+ naming conventions, this is not the same type of class as
+ ``DiscoverRunner``, which covers a broader set of responsibilites. You
+ can override this attribute to modify the way tests are run and reported.
+
.. attribute:: DiscoverRunner.test_loader
This is the class that loads tests, whether from TestCases or modules or