Skip to content

Commit 5ecf3d7

Browse files
authored
Merge pull request #1819 from matthiasha/patch-1
Documentation update for rootdir discovery
2 parents 3e685d6 + c8fbf3a commit 5ecf3d7

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ Martijn Faassen
7878
Martin Prusse
7979
Martin K. Scherer
8080
Matt Bachmann
81+
Matthias Hafner
8182
Michael Aquilina
8283
Michael Birtwell
8384
Michael Droettboom

CHANGELOG.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838

3939
* Refined logic for determining the ``rootdir``, considering only valid
4040
paths which fixes a number of issues: `#1594`_, `#1435`_ and `#1471`_.
41-
Thanks to `@blueyed`_ and `@davehunt`_ for the PR.
41+
Updated the documentation according to current behavior. Thanks to
42+
`@blueyed`_, `@davehunt`_ and `@matthiasha`_ for the PR.
4243

4344
* Always include full assertion explanation. The previous behaviour was hiding
4445
sub-expressions that happened to be False, assuming this was redundant information.
@@ -126,6 +127,7 @@
126127
.. _@Stranger6667: https://github.com/Stranger6667
127128
.. _@taschini: https://github.com/taschini
128129
.. _@Vogtinator: https://github.com/Vogtinator
130+
.. _@matthiasha: https://github.com/matthiasha
129131

130132

131133
2.9.2

doc/en/customize.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ Here is the algorithm which finds the rootdir from ``args``:
4848
directory. This allows to work with pytest in structures that are not part of
4949
a package and don't have any particular ini-file configuration.
5050

51+
If no ``args`` are given, pytest collects test below the current working
52+
directory and also starts determining the rootdir from there.
53+
54+
:warning: custom pytest plugin commandline arguments may include a path, as in
55+
``pytest --log-output ../../test.log args``. Then ``args`` is mandatory,
56+
otherwise pytest uses the folder of test.log for rootdir determination
57+
(see also `issue 1435 <https://github.com/pytest-dev/pytest/issues/1435>`_).
58+
A dot ``.`` for referencing to the current working directory is also
59+
possible.
60+
5161
Note that an existing ``pytest.ini`` file will always be considered a match,
5262
whereas ``tox.ini`` and ``setup.cfg`` will only match if they contain a
5363
``[pytest]`` section. Options from multiple ini-files candidates are never

0 commit comments

Comments
 (0)