[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
d6cf5e1e6b
commit
f57855341b
|
@ -114,15 +114,15 @@ which are better explained in this excellent `blog post`_ by Ionel Cristian Măr
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
If you do not use an editable install and use the ``src`` layout as above you need to extend the Python's
|
If you do not use an editable install and use the ``src`` layout as above you need to extend the Python's
|
||||||
search path for module files to execute the tests against the local copy directly. You can do it in an
|
search path for module files to execute the tests against the local copy directly. You can do it in an
|
||||||
ad-hoc manner by setting the ``PYTHONPATH`` environment variable:
|
ad-hoc manner by setting the ``PYTHONPATH`` environment variable:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
PYTHONPATH=src pytest
|
PYTHONPATH=src pytest
|
||||||
|
|
||||||
or in a permanent manner by using the :confval:`pythonpath` configuration variable and adding the
|
or in a permanent manner by using the :confval:`pythonpath` configuration variable and adding the
|
||||||
following to your ``pyproject.toml``:
|
following to your ``pyproject.toml``:
|
||||||
|
|
||||||
.. code-block:: toml
|
.. code-block:: toml
|
||||||
|
@ -132,8 +132,8 @@ which are better explained in this excellent `blog post`_ by Ionel Cristian Măr
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
If you do not use an editable install and not use the ``src`` layout (``mypkg`` directly in the root
|
If you do not use an editable install and not use the ``src`` layout (``mypkg`` directly in the root
|
||||||
directory) you can rely on the fact that Python by default puts the current directory in ``sys.path`` to
|
directory) you can rely on the fact that Python by default puts the current directory in ``sys.path`` to
|
||||||
import your package and run ``python -m pytest`` to execute the tests against the local copy directly.
|
import your package and run ``python -m pytest`` to execute the tests against the local copy directly.
|
||||||
|
|
||||||
See :ref:`pytest vs python -m pytest` for more information about the difference between calling ``pytest`` and
|
See :ref:`pytest vs python -m pytest` for more information about the difference between calling ``pytest`` and
|
||||||
|
|
Loading…
Reference in New Issue