Open
Description
steps to reproduce:
- create venv
- have file with pytest
- configure pytest
- see error because pytest is not installed but user selected it as the testing framework
a few things I want to fix:
- the extension attempts to install pytest if the user doesn't have it. I want to update this so it checks to see if the user has the python environments extension, if it does then introduce a popup which says something like "pytest selected but not installed, would you you like to install pytest?" "yes" "ignore". Then "yes" will call install package in the current environment with pytest as the package.
- better error handling so if pytest isn't installed, and is either attempted to run or attempted to install and doesn't work, the error node in the test panel tree says something more specific like "pytest not installed". Here are the logs related to when that errors:
2025-07-08 09:09:42.617 [info] > ./.venv/bin/python -c "import pip"
2025-07-08 09:09:42.652 [debug] could not find a pixi interpreter for the interpreter at /opt/homebrew/bin/python3
2025-07-08 09:09:42.653 [debug] Activation Commands received undefined for shell bash, resource undefined and interpreter /opt/homebrew/bin/python3
2025-07-08 09:09:42.654 [info] > ./.venv/bin/python -c "import pytest"
2025-07-08 09:09:42.685 [debug] Error when checking if module is installed pytest n [Error]: Traceback (most recent call last):
File "<string>", line 1, in <module>
import pytest
ModuleNotFoundError: No module named 'pytest'