0

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".

enter image description here

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:

enter image description here

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 ?

WestCoastProjects
  • 58,982
  • 91
  • 316
  • 560

0 Answers0