From 799dab9dbabb9ed68f727b6bb63b471613d79e48 Mon Sep 17 00:00:00 2001 From: matthiasha Date: Fri, 19 Aug 2016 09:01:12 +0200 Subject: [PATCH 1/5] 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 a8e6809670b..fe52a76ed71 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 From ccfa8d15bffd4753a3cce472cd249e3d01667a02 Mon Sep 17 00:00:00 2001 From: matthiasha Date: Fri, 19 Aug 2016 09:04:19 +0200 Subject: [PATCH 2/5] Update AUTHORS --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 254207071cb..1772d171389 100644 --- a/AUTHORS +++ b/AUTHORS @@ -78,6 +78,7 @@ Martijn Faassen Martin Prusse Martin K. Scherer Matt Bachmann +Matthias Hafner Michael Aquilina Michael Birtwell Michael Droettboom From cd39cc1eec48713a74848f4448066312e312d861 Mon Sep 17 00:00:00 2001 From: matthiasha Date: Fri, 19 Aug 2016 09:08:11 +0200 Subject: [PATCH 3/5] Mention doc update in CHANGELOG --- CHANGELOG.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c26d071e5d6..f03050d0b41 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -38,7 +38,8 @@ * Refined logic for determining the ``rootdir``, considering only valid paths which fixes a number of issues: `#1594`_, `#1435`_ and `#1471`_. - Thanks to `@blueyed`_ and `@davehunt`_ for the PR. + Updated the documentation according to current behavior. Thanks to + `@blueyed`_, `@davehunt`_ and `@matthiasha`_ for the PR. * Always include full assertion explanation. The previous behaviour was hiding sub-expressions that happened to be False, assuming this was redundant information. From 3455dfc8045eb73dc7617b5777b3a3e6611db14f Mon Sep 17 00:00:00 2001 From: matthiasha Date: Fri, 19 Aug 2016 14:01:07 +0200 Subject: [PATCH 4/5] add missing @matthiasha link --- CHANGELOG.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index f03050d0b41..76ba4c217e1 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -127,6 +127,7 @@ .. _@Stranger6667: https://github.com/Stranger6667 .. _@taschini: https://github.com/taschini .. _@Vogtinator: https://github.com/Vogtinator +.. _@matthiasha: https://github.com/matthiasha 2.9.2 From c8fbf3ae341ba0adc11b0ca0669085b72be06756 Mon Sep 17 00:00:00 2001 From: matthiasha Date: Fri, 19 Aug 2016 14:02:25 +0200 Subject: [PATCH 5/5] remove dot in pytest --- doc/en/customize.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/customize.rst b/doc/en/customize.rst index fe52a76ed71..fbbcea5497b 100644 --- a/doc/en/customize.rst +++ b/doc/en/customize.rst @@ -52,7 +52,7 @@ 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, + ``pytest --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