mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
#11298: merge from 3.2.
This commit is contained in:
commit
684d78cfb0
1 changed files with 5 additions and 3 deletions
|
@ -277,9 +277,11 @@ Test Discovery
|
||||||
|
|
||||||
.. versionadded:: 3.2
|
.. versionadded:: 3.2
|
||||||
|
|
||||||
Unittest supports simple test discovery. For a project's tests to be
|
Unittest supports simple test discovery. In order to be compatible with test
|
||||||
compatible with test discovery they must all be importable from the top level
|
discovery, all of the test files must be :ref:`modules <tut-modules>` or
|
||||||
directory of the project (in other words, they must all be in Python packages).
|
: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
|
Test discovery is implemented in :meth:`TestLoader.discover`, but can also be
|
||||||
used from the command line. The basic command-line usage is::
|
used from the command line. The basic command-line usage is::
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue