From 1b7fe09660e640bd3cdbf55d340b702d951dd22e Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Mon, 23 Jul 2007 12:14:32 +0000 Subject: 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 --- docs/testing.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'docs') 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 -- cgit v1.3