Pytest Installation: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= * Pytest =Overview= <font color=darkkhaki> This procedure worked for a virtual environment located with the project. Configured direnv to set...")
 
Line 3: Line 3:


=Overview=
=Overview=
<code>pytest</code> is installed in a virtual environment and then used from that virtual environment.
For your project, configure <code>direnv</code> to set PATH to give priority to your virtual environment <code>bin</code> directory. In <code>.envrc</code>:
<syntaxhighlight lang='bash'>
PATH_add "./src/main/python/venv/bin"
</syntaxhighlight>


<font color=darkkhaki>
<font color=darkkhaki>

Revision as of 01:24, 9 June 2022

Internal

Overview

pytest is installed in a virtual environment and then used from that virtual environment.

For your project, configure direnv to set PATH to give priority to your virtual environment bin directory. In .envrc:

PATH_add "./src/main/python/venv/bin"


This procedure worked for a virtual environment located with the project. Configured direnv to set PATH to give priority to the local virtual environment pip.

pip install -U pytest

pytest was installed in the local virtual environment.