Skip to content

Commit

Permalink
Document script discovery wrt changedir (#2089) (#2096)
Browse files Browse the repository at this point in the history
Co-authored-by: Felix Hildén <felix.hilden@gmail.com>
Co-authored-by: felix-hilden <felix.hilden@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people committed Jun 23, 2021
1 parent c5488a6 commit 63845cd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ David Diaz
Ederag
Eli Collins
Eugene Yunak
Felix Hildén
Fernando L. Pereira
Florian Bruhin
Florian Preinstorfer
Expand Down
9 changes: 8 additions & 1 deletion docs/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,13 @@ Complete list of settings that you can put into ``testenv*`` sections:
translates as the virtual environments ``python`` (having the same runtime version
as the :conf:`basepython`), and ``pip`` translates as the virtual environments ``pip``.

:note: Inline scripts can be used, however note these are discovered from the project root directory,
and is not influenced by :conf:`changedir` (this only affects the runtime current working directory).
To make this behaviour explicit we recommend that you make inline scripts absolute paths by
prepending ``{toxinidir}``, instead of ``path/to/my_script`` prefer
``{toxinidir}{/}path{/}to{/}my_script``. If your inline script is platform dependent refer to
:ref:`platform-specification` on how to select different script per platform.

.. conf:: commands_pre ^ ARGVLIST

.. versionadded:: 3.4
Expand Down Expand Up @@ -360,7 +367,7 @@ Complete list of settings that you can put into ``testenv*`` sections:

.. conf:: changedir ^ PATH ^ {toxinidir}

Change to this working directory when executing the test command.
Change the current working directory when executing the test command.

.. note::

Expand Down
2 changes: 2 additions & 0 deletions docs/example/platform.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _platform-specification:

Platform specification
============================

Expand Down

0 comments on commit 63845cd

Please sign in to comment.