I can run the pytest
unit test simply by right-clicking in the source file shown in the screenshot. It runs successfully. But the screenshot also shows that import pytest
is not understood: "No module found pytest".
Note that the python interpreter
is a venv
created in the current source directory and the pip
installed libraries are the correct ones including pytest:
Also note that similar questions e.g. ModuleNotFoundError: No module named 'pytest' are related to pointing to a system version of python
and that is not the case here
So why is the interpreter not finding pytest
?