• pytest can be installed using pip as follows:
pip install -U pytest
  • It can also be added as a dev dependency to your project, using uv as follows:
uv add --dev pytest
  • You can alternatively install it as a global tool using uv as follows:
uv tool install pytest