summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2007-07-23 13:52:59 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2007-07-23 13:52:59 +0000
commit3b78695a641d8a8bd47f8432219ff3662ca224f1 (patch)
tree07508c2a9904039520a77afd7aee9a6cdb27c105 /docs
parent1b7fe09660e640bd3cdbf55d340b702d951dd22e (diff)
Added documentation for a test runner argument that has always been present, but was undocumented.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5753 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/testing.txt13
1 files changed, 9 insertions, 4 deletions
diff --git a/docs/testing.txt b/docs/testing.txt
index abb47d3319..fb472a2cc2 100644
--- a/docs/testing.txt
+++ b/docs/testing.txt
@@ -662,12 +662,13 @@ framework that can be executed from Python code.
Defining a test runner
----------------------
By convention, a test runner should be called ``run_tests``; however, you
-can call it anything you want. The only requirement is that it accept three
-arguments:
+can call it anything you want. The only requirement is that it has the
+same arguments as the Django test runner:
-``run_tests(module_list, verbosity=1, interactive=True)``
+``run_tests(module_list, verbosity=1, interactive=True, extra_tests=[])``
The module list is the list of Python modules that contain the models to be
- tested. This is the same format returned by ``django.db.models.get_apps()``
+ tested. This is the same format returned by ``django.db.models.get_apps()``.
+ The test runner should search these modules for tests to execute.
Verbosity determines the amount of notification and debug information that
will be printed to the console; ``0`` is no output, ``1`` is normal output,
@@ -679,6 +680,10 @@ arguments:
delete an existing test database. If ``interactive`` is ``False, the
test suite must be able to run without any manual intervention.
+ ``extra_tests`` is a list of extra ``TestCase`` instances to add to the
+ suite that is executed by the test runner. These extra tests are run
+ in addition to those discovered in the modules listed in ``module_list``.
+
This method should return the number of tests that failed.
Testing utilities