Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added documentation for a test runner argument that has always been p…

…resent, but was undocumented.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@5753 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 3b78695a641d8a8bd47f8432219ff3662ca224f1 1 parent 1b7fe09
Russell Keith-Magee authored July 23, 2007

Showing 1 changed file with 9 additions and 4 deletions. Show diff stats Hide diff stats

  1. 13  docs/testing.txt
13  docs/testing.txt
@@ -662,12 +662,13 @@ framework that can be executed from Python code.
662 662
 Defining a test runner
663 663
 ----------------------
664 664
 By convention, a test runner should be called ``run_tests``; however, you
665  
-can call it anything you want. The only requirement is that it accept three
666  
-arguments:
  665
+can call it anything you want. The only requirement is that it has the
  666
+same arguments as the Django test runner:
667 667
 
668  
-``run_tests(module_list, verbosity=1, interactive=True)``
  668
+``run_tests(module_list, verbosity=1, interactive=True, extra_tests=[])``
669 669
     The module list is the list of Python modules that contain the models to be
670  
-    tested. This is the same format returned by ``django.db.models.get_apps()``
  670
+    tested. This is the same format returned by ``django.db.models.get_apps()``.
  671
+    The test runner should search these modules for tests to execute.
671 672
 
672 673
     Verbosity determines the amount of notification and debug information that
673 674
     will be printed to the console; ``0`` is no output, ``1`` is normal output,
@@ -679,6 +680,10 @@ arguments:
679 680
     delete an existing test database. If ``interactive`` is ``False, the 
680 681
     test suite must be able to run without any manual intervention.
681 682
     
  683
+    ``extra_tests`` is a list of extra ``TestCase`` instances to add to the 
  684
+    suite that is executed by the test runner. These extra tests are run 
  685
+    in addition to those discovered in the modules listed in ``module_list``.
  686
+    
682 687
     This method should return the number of tests that failed.
683 688
 
684 689
 Testing utilities

0 notes on commit 3b78695

Please sign in to comment.
Something went wrong with that request. Please try again.