diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/releases/1.7.txt | 8 | ||||
| -rw-r--r-- | docs/topics/testing/advanced.txt | 19 |
2 files changed, 27 insertions, 0 deletions
diff --git a/docs/releases/1.7.txt b/docs/releases/1.7.txt index e84f738530..9f05055fd2 100644 --- a/docs/releases/1.7.txt +++ b/docs/releases/1.7.txt @@ -285,6 +285,14 @@ Templates * ``TypeError`` exceptions are not longer silenced when raised during the rendering of a template. +Tests +^^^^^ + +* :class:`~django.test.runner.DiscoverRunner` has two new attributes, + :attr:`~django.test.runner.DiscoverRunner.test_suite` and + :attr:`~django.test.runner.DiscoverRunner.test_runner`, which facilitate + overriding the way tests are collected and run. + Backwards incompatible changes in 1.7 ===================================== 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 |
