From 799dab9dbabb9ed68f727b6bb63b471613d79e48 Mon Sep 17 00:00:00 2001 From: matthiasha Date: Fri, 19 Aug 2016 09:01:12 +0200 Subject: [PATCH] Documentation update for rootdir discovery This covers issue https://github.com/pytest-dev/pytest/issues/1435. --- doc/en/customize.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/en/customize.rst b/doc/en/customize.rst index a8e680967..fe52a76ed 100644 --- a/doc/en/customize.rst +++ b/doc/en/customize.rst @@ -48,6 +48,16 @@ Here is the algorithm which finds the rootdir from ``args``: directory. This allows to work with pytest in structures that are not part of a package and don't have any particular ini-file configuration. +If no ``args`` are given, pytest collects test below the current working +directory and also starts determining the rootdir from there. + +:warning: custom pytest plugin commandline arguments may include a path, as in + ``py.test --log-output ../../test.log args``. Then ``args`` is mandatory, + otherwise pytest uses the folder of test.log for rootdir determination + (see also `issue 1435 `_). + A dot ``.`` for referencing to the current working directory is also + possible. + Note that an existing ``pytest.ini`` file will always be considered a match, whereas ``tox.ini`` and ``setup.cfg`` will only match if they contain a ``[pytest]`` section. Options from multiple ini-files candidates are never