From 3d995843ce0e5f0c1f5875a6092369bfe83cbec0 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Tue, 8 Mar 2011 16:17:35 +0200 Subject: #11298: Improve the unittest discovery explanation. --- Doc/library/unittest.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst index 047d458..8366bab 100644 --- a/Doc/library/unittest.rst +++ b/Doc/library/unittest.rst @@ -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 ` or +:ref:`packages ` importable from the top-level directory of +the project (this means that their filenames must be valid +:ref:`identifiers `). Test discovery is implemented in :meth:`TestLoader.discover`, but can also be used from the command line. The basic command-line usage is:: -- cgit v0.12