diff options
| author | Tim Graham <timograham@gmail.com> | 2013-09-07 16:10:07 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-09-07 16:11:03 -0400 |
| commit | c03848b540d2787adda27f73a69a7980b38c7ac6 (patch) | |
| tree | 76cbb8bbb846c902ddd1eed2fe9ec669f63e3609 /docs | |
| parent | 01edcf70f2911b1953b7789bda18d2498fc73bd0 (diff) | |
[1.6.x] Fixed #21068 -- Added some docs for DiscoverRunner
Thanks jcd.
Backport of e4b012feeb from master
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/testing/advanced.txt | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/docs/topics/testing/advanced.txt b/docs/topics/testing/advanced.txt index 2417274ab5..c8d23d6fc2 100644 --- a/docs/topics/testing/advanced.txt +++ b/docs/topics/testing/advanced.txt @@ -300,11 +300,13 @@ Defining a test runner .. currentmodule:: django.test.runner +.. versionadded:: 1.6 + A test runner is a class defining a ``run_tests()`` method. Django ships -with a ``DiscoverRunner`` class that defines the default Django -testing behavior. This class defines the ``run_tests()`` entry point, -plus a selection of other methods that are used to by ``run_tests()`` to -set up, execute and tear down the test suite. +with a ``DiscoverRunner`` class that defines the default Django testing +behavior. This class defines the ``run_tests()`` entry point, plus a +selection of other methods that are used to by ``run_tests()`` to set up, +execute and tear down the test suite. .. class:: DiscoverRunner(pattern='test*.py', top_level=None, verbosity=1, interactive=True, failfast=True, **kwargs) @@ -341,6 +343,13 @@ set up, execute and tear down the test suite. Attributes ~~~~~~~~~~ +.. attribute:: DiscoverRunner.test_loader + + This is the class that loads tests, whether from TestCases or modules or + otherwise and bundles them into test suites for the runner to execute. + By default it is set to ``unittest.defaultTestLoader``. You can override + this attribute if your tests are going to be loaded in unusual ways. + .. attribute:: DiscoverRunner.option_list This is the tuple of ``optparse`` options which will be fed into the |
