-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Launching via GitHub Desktop causes tests to fail #19090
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can you try to change the setting |
Looks like that's already unchecked -- here's my settings.json:
|
I suspect VSCode is launched via an activated conda environment when using Github Desktop, in that case this is a dup of #19070 and is caused due to conda conda/conda#11305, conda/conda#11174. What happens if you run the following command in VSCode terminal?
Is |
whoops, I pasted the pytest failure for my larger repo -- I changed it above to reflect the small demo repo I created as a minimal example, and translated your commands here to that repo as well. Launching via github desktop with the tests failing -- The conda environment seems to be activated correctly:
The
|
Thanks for the info, it is a dup of #19070. What happens is |
Hmm, I'm launching Github Desktop from it's Applications/ app shortcut, not via a terminal (that might have an activated conda environment). |
I see, but for some reason it has conda environment has its default python, maybe it uses the selected interpreter for launching VSCode and you've the conda env selected? Try changing your selected interpreter. |
Related to #18431
I was able to track down steps to reproduce my issue. On a Mac, using GitHub Desktop Version 3.0.0 with vscode as my default editor. Using a basic repo here, which just uses a conda environment to run a some pytest tests: https://github.com/pstjohn/vscode-pytest-demo
If I open the repo using the github desktop "open in external editor" command, pytests fail with the following error, indicating that the editor is picking up the system's python 2.7; not my local conda environment.
If I manually open the repository (in this case using
code .
from the repository's directory in iTerm2), the tests are able to be discovered and run fine.Diagnostic data
python.languageServer
setting: PylanceUser Settings
The text was updated successfully, but these errors were encountered: