summaryrefslogtreecommitdiff
path: root/docs/testing.txt
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2007-07-23 12:14:32 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2007-07-23 12:14:32 +0000
commit1b7fe09660e640bd3cdbf55d340b702d951dd22e (patch)
tree61fb2561c28724599366947f52ae47d758b71f85 /docs/testing.txt
parent304381616f89745c2b52ba793e5b23184c4788bb (diff)
Fixed #3771 -- Modified the test runner to observe the --noinput argument controlling script interactivity. This means that test scripts can now be put in a buildbot environment. This is a backwards incompatible change for anyone that has written a custom test runner. Thanks for the suggestion, moof@metamoof.net.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5752 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/testing.txt')
-rw-r--r--docs/testing.txt10
1 files changed, 8 insertions, 2 deletions
diff --git a/docs/testing.txt b/docs/testing.txt
index 4158e9277a..abb47d3319 100644
--- a/docs/testing.txt
+++ b/docs/testing.txt
@@ -662,10 +662,10 @@ 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 two
+can call it anything you want. The only requirement is that it accept three
arguments:
-``run_tests(module_list, verbosity=1)``
+``run_tests(module_list, verbosity=1, interactive=True)``
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()``
@@ -673,6 +673,12 @@ arguments:
will be printed to the console; ``0`` is no output, ``1`` is normal output,
and ``2`` is verbose output.
+ **New in Django development version** If ``interactive`` is ``True``, the
+ test suite may ask the user for instructions when the test suite is
+ executed. An example of this behavior would be asking for permission to
+ delete an existing test database. If ``interactive`` is ``False, the
+ test suite must be able to run without any manual intervention.
+
This method should return the number of tests that failed.
Testing utilities