Environment data
- VS Code version: 1.23.1
- Extension version (available under the Extensions sidebar): 2018.4.0
- OS and version: Windows 7 Enterprise
- Python version (& distribution if applicable, e.g. Anaconda): Python 3.6.5
- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): pipenv
- Relevant/affected Python packages and their versions: pytest
Actual behavior
Vscode don't load envFile vars in "Debug Unit Tests (Pytest)" mode, only in "Run Unit Tests (Pytest)" mode or in default "Debug/Run" modes.
Expected behavior
To load envFile vars to os.environ
Steps to reproduce:
- Config envFile:
"python.envFile": "${workspaceFolder}/dev.env",
2.Config PyTest
"python.unitTest.pyTestArgs": [
"-v", // increase verbosity
"-l", // show locals in tracebacks
"-x", // exit instantly on first error or failed test
"--ff", // run all tests but run the last failures first
"--show-capture=all", // captured stdout/stderr/log is shown on failed tests
"--color=yes", // color terminal output (yes/no/auto)
//"--rootdir=${workspaceFolder}/",
"tests", // starting directory for discovering tests
],
"python.unitTest.pyTestEnabled": true
3.Vscode cmd: > Python: Debug All Unit Tests
Environment data
Actual behavior
Vscode don't load envFile vars in "Debug Unit Tests (Pytest)" mode, only in "Run Unit Tests (Pytest)" mode or in default "Debug/Run" modes.
Expected behavior
To load envFile vars to os.environ
Steps to reproduce:
"python.envFile": "${workspaceFolder}/dev.env",2.Config PyTest
3.Vscode cmd:
> Python: Debug All Unit Tests