diff --git a/doc/en/customize.rst b/doc/en/customize.rst index 1c1655697..34e319c24 100644 --- a/doc/en/customize.rst +++ b/doc/en/customize.rst @@ -162,7 +162,7 @@ Builtin configuration file options .. versionadded:: 2.8 Sets list of directories that should be searched for tests when - no specific directories or files are given in the command line when + no specific directories, files or test ids are given in the command line when executing pytest from the :ref:`rootdir ` directory. Useful when all project tests are in a known location to speed up test collection and to avoid picking up undesired tests by accident. diff --git a/doc/en/goodpractises.rst b/doc/en/goodpractises.rst index ae93e0c2a..b2c34bae9 100644 --- a/doc/en/goodpractises.rst +++ b/doc/en/goodpractises.rst @@ -13,11 +13,9 @@ Conventions for Python test discovery ``pytest`` implements the following standard test discovery: -* collection starts from paths specified in :confval:`testpaths` if configured, - otherwise from initial command line arguments which may be directories, - filenames or test ids. If :confval:`testpaths` is not configured and no - directories or files were given in the command line, start collection from - the current directory. +* If no arguments are specified then collection starts from :confval:`testpaths` + (if configured) or the current directory. Alternatively, command line arguments + can be used in any combination of directories, file names or node ids. * recurse into directories, unless they match :confval:`norecursedirs` * ``test_*.py`` or ``*_test.py`` files, imported by their `test package name`_. * ``Test`` prefixed test classes (without an ``__init__`` method)