Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation update for rootdir discovery #1819

Merged
merged 5 commits into from
Aug 19, 2016
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ Martijn Faassen
Martin Prusse
Martin K. Scherer
Matt Bachmann
Matthias Hafner
Michael Aquilina
Michael Birtwell
Michael Droettboom
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll need to add a link for yourself further down

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


* Always include full assertion explanation. The previous behaviour was hiding
sub-expressions that happened to be False, assuming this was redundant information.
Expand Down
10 changes: 10 additions & 0 deletions doc/en/customize.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While you are at it, could you change py.test to pytest? We will be releasing 3.0 today probably, so it's fine for this to use the new ter from the start.

otherwise pytest uses the folder of test.log for rootdir determination
(see also `issue 1435 <https://github.com/pytest-dev/pytest/issues/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
Expand Down