summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2011-03-08 17:08:25 +0200
committerEzio Melotti <ezio.melotti@gmail.com>2011-03-08 17:08:25 +0200
commit9e1ed47e91ceadc961ae58e2179b324f085d54e5 (patch)
tree882994e0e606a71aca56af295ed96f1ab79cf35d
parent1e93f4d1c99c400e48169f77fc8b9f66dfc56efc (diff)
downloadcpython-git-9e1ed47e91ceadc961ae58e2179b324f085d54e5.tar.gz
#11298: Improve the unittest discovery explanation.
-rw-r--r--Doc/library/unittest.rst8
1 files changed, 5 insertions, 3 deletions
diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst
index 333b399f3b..346b8a2682 100644
--- a/Doc/library/unittest.rst
+++ b/Doc/library/unittest.rst
@@ -257,9 +257,11 @@ Test Discovery
.. versionadded:: 2.7
-Unittest supports simple test discovery. For a project's tests to be
-compatible with test discovery they must all be importable from the top level
-directory of the project (in other words, they must all be in Python packages).
+Unittest supports simple test discovery. In order to be compatible with test
+discovery, all of the test files must be :ref:`modules <tut-modules>` or
+:ref:`packages <tut-packages>` importable from the top-level directory of
+the project (this means that their filenames must be valid
+:ref:`identifiers <identifiers>`).
Test discovery is implemented in :meth:`TestLoader.discover`, but can also be
used from the command line. The basic command-line usage is::