I'm having a strange problem with VSCode's python testing functionality. When I try to discover tests I get the following error:
> conda run -n sandbox --no-capture-output python ~/.vscode/extensions/ms-python.python-2022.0.1786462952/pythonFiles/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2022.0.1786462952/pythonFiles/testing_tools/run_adapter.py discover pytest -- --rootdir . -s --cache-clear .
cwd: .
[ERROR 2022-1-3 21:49:47.851]: Error discovering pytest tests:
[r [Error]:
EnvironmentLocationNotFound: Not a conda environment: /Users/david.hoffman/miniconda3/envs/sandbox/envs/sandbox
But obviously there's a duplication error: /Users/david.hoffman/miniconda3/envs/sandbox/envs/sandbox.
If I run this command directly in the terminal I get the expected output and no errors:
conda run -n sandbox --no-capture-output python ~/.vscode/extensions/ms-python.python-2022.0.1786462952/pythonFiles/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2022.0.1786462952/pythonFiles/testing_tools/run_adapter.py discover pytest -- --rootdir . -s --cache-clear
I'm completely stumped as there doesn't seem to be any settings that would affect this.
I tried reinstalling VSCode from scratch (after removing all the local files) same with conda.