Search code examples
pythonunit-testingvisual-studio-codepytest

How to add env variable to pytest in vscode for the side bar?


I created launch json for tests in vscode and it works well in terminal, but vscode don't see tests in the side bar, becouse side bar don't get environment variables from launch.json. How to add environment variables for the side bar?

enter image description here


Solution

  • I found solution, need to use pip install pytest-env