summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTianyi Wang <wty52133@gmail.com>2013-12-16 21:47:11 +0000
committerBaptiste Mispelon <bmispelon@gmail.com>2013-12-18 14:30:20 +0100
commit60517c9c09daffee678fd4337687185ce38ed35b (patch)
tree3cfa214124aed508ae7c3a95b4b55b414c0a9cb6 /docs
parente888760854ad674772abe10e1c3741e5c6308aa9 (diff)
[1.6.x] Fixed #21625 -- incorrect documentation for DiscoverRunner.build_suite
Backport of b62031441b2e1cb1eeb7e1d6f254c553643add96 from master.
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/testing/advanced.txt35
1 files changed, 14 insertions, 21 deletions
diff --git a/docs/topics/testing/advanced.txt b/docs/topics/testing/advanced.txt
index 8f949c113b..b7fced1688 100644
--- a/docs/topics/testing/advanced.txt
+++ b/docs/topics/testing/advanced.txt
@@ -363,21 +363,9 @@ Methods
Run the test suite.
- ``test_labels`` is a list of strings describing the tests to be run. A test
- label can take one of four forms:
-
- * ``path.to.test_module.TestCase.test_method`` -- Run a single test method
- in a test case.
- * ``path.to.test_module.TestCase`` -- Run all the test methods in a test
- case.
- * ``path.to.module`` -- Search for and run all tests in the named Python
- package or module.
- * ``path/to/directory`` -- Search for and run all tests below the named
- directory.
-
- If ``test_labels`` has a value of ``None``, the test runner will search for
- tests in all files below the current directory whose names match its
- ``pattern`` (see above).
+ ``test_labels`` allows you to specify which tests to run and supports
+ several formats (see :meth:`DiscoverRunner.build_suite` for a list of
+ supported formats).
``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
@@ -396,15 +384,20 @@ Methods
Constructs a test suite that matches the test labels provided.
``test_labels`` is a list of strings describing the tests to be run. A test
- label can take one of three forms:
+ label can take one of four forms:
- * ``app.TestCase.test_method`` -- Run a single test method in a test
+ * ``path.to.test_module.TestCase.test_method`` -- Run a single test method
+ in a test case.
+ * ``path.to.test_module.TestCase`` -- Run all the test methods in a test
case.
- * ``app.TestCase`` -- Run all the test methods in a test case.
- * ``app`` -- Search for and run all tests in the named application.
+ * ``path.to.module`` -- Search for and run all tests in the named Python
+ package or module.
+ * ``path/to/directory`` -- Search for and run all tests below the named
+ directory.
- If ``test_labels`` has a value of ``None``, the test runner should run
- search for tests in all the applications in :setting:`INSTALLED_APPS`.
+ If ``test_labels`` has a value of ``None``, the test runner will search for
+ tests in all files below the current directory whose names match its
+ ``pattern`` (see above).
``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