Pytest Installation: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 12: Line 12:
</syntaxhighlight>
</syntaxhighlight>


Then install <code>pytest</code> with that <code>pip</code>:


 
<syntaxhighlight lang='bash'>
<font color=darkkhaki>
pip install -U pytest
This procedure worked for a virtual environment located with the project. Configured direnv to set PATH to give priority to the local virtual environment <code>pip</code>.
</syntaxhighlight>
 
<font size=-1>
pip install -U pytest
</font>
 
pytest was installed in the local virtual environment.
</font>

Revision as of 01:25, 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"

Then install pytest with that pip:

pip install -U pytest