Skip to content

VS code Error discovering Pytest tests

Antoine Blachair edited this page Jul 7, 2022 · 4 revisions

Problem

Pytest fails to discover the unit tests

Environment

MacOs

Solution

  1. Make sure you select Configure Python Tests -> Pytest as a Test framework
Screen Shot 2022-07-05 at 4 50 46 pm
  1. Select the Python interpreter from your virtual environment (using cmd+shift+p -> Select: Python interpreter)
Screen Shot 2022-07-06 at 2 41 46 pm