]> granicus.if.org Git - python/commitdiff
#11298: Improve the unittest discovery explanation.
authorEzio Melotti <ezio.melotti@gmail.com>
Tue, 8 Mar 2011 14:17:35 +0000 (16:17 +0200)
committerEzio Melotti <ezio.melotti@gmail.com>
Tue, 8 Mar 2011 14:17:35 +0000 (16:17 +0200)
Doc/library/unittest.rst

index 047d458d29bcf9a6373fb9787159259a99ca50bc..8366bab394876ecdb2260f247734137336f7d8cb 100644 (file)
@@ -277,9 +277,11 @@ Test Discovery
 
 .. versionadded:: 3.2
 
-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::