You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should expand ${workspaceFolder}/src in .env while doing test discovery or test runs.
.env:
PYTHONPATH=${workspaceFolder}/src
Actual behaviour
Does not expand ${workspaceFolder} for test discovery.
Steps to reproduce:
Clone ptvsd, open it and wait for extension to load
Once you see tests are discovered.
Open .env file and change from PYTHONPATH=./src to PYTHONPATH=${workspaceFolder}/src
Reload.
Test discovery fails.
Logs
Python Test Logs.
python c:\Users\kanadig\.vscode\extensions\ms-python.python-2019.9.34911\pythonFiles\testing_tools\run_adapter.py discover pytest -- -s --cache-clear
Test Discovery failed:
Error: ImportError while loading conftest 'c:\GIT\ptvsd\tests\conftest.py'.
tests\__init__.py:52: in <module>
from ptvsd.common import json, log
E ModuleNotFoundError: No module named 'ptvsd'
The text was updated successfully, but these errors were encountered:
Sorry, this isn't a duplicate of #7581. Closing this as ${workspaceFolder} and such variables are not supported in .env files.
.env files is not a concept that was coined by the VS Code extension, this is in use by other tools.
We won't be adding support for such variables that are specific to the context of the vs code execution environment as these will not work outside VS Code (making the .env file less portable and more VS Code specific (which they aren't)
Environment data
"python.jediEnabled"
set to; more info How to update the language server to the latest stable version #3977): LSExpected behaviour
Should expand ${workspaceFolder}/src in .env while doing test discovery or test runs.
.env:
Actual behaviour
Does not expand ${workspaceFolder} for test discovery.
Steps to reproduce:
.env
file and change fromPYTHONPATH=./src
toPYTHONPATH=${workspaceFolder}/src
Logs
Python Test Logs.
The text was updated successfully, but these errors were encountered: