-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Virtual environment not activated before running pytest (or other tools) via the extension #16019
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
Hi @Smattacus, thank you for reaching out!
You got it there, it's actually a long-standing issue: #4300 (feel free to upvote it!). I reworded the title of the issue you created to make it more generic, since it's a problem that we have with all the tools being run by the extension behind the scenes. |
Thanks for the follow up @kimadeline! I'll upvote it there. Again, thanks for this extension - I find it very useful. |
Same issue when debugging: #4300 |
If tests are run in terminal, consider this issue fixed. Otherwise, the issue is likely still there. |
Should be fixed with #4300. |
Issue Type: Bug
Notes
I have a Windows machine with a remote SSH to a linux machine that is running my Python and tests. It appears that sometimes the virtual environment isn't set up before a debug or run with pytest through VSCode. If I run pytest using the integrated terminal, everything runs fine. I have another situation where the test is failing in both normal and debug run mode, but I haven't been able to recreate it with my simple testcase above yet.
Thank you for all the work on this great extension and on VSCode, using it has been very enjoyable!!
Environment data
python.languageServer
setting: JediExpected Behavior
Returncode should be 0, and stdout should have flake8 --help information.
Actual Behavior
Test fails in debug mode with stderr capture: "/bin/sh: flake8: command not found". Test succeeds in normal run mode.
Steps to Reproduce
My settings.json for this testcase:
Logs
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Information from VSCode reporting tool
VS Code version: Code 1.55.2 (3c4e3df9e89829dce27b7b5c24508306b151f30d, 2021-04-13T09:35:57.887Z)
OS version: Windows_NT x64 10.0.18363
Remote OS version: Linux x64 4.12.14-122.60-default
Remote OS version: Linux x64 4.12.14-122.60-default
System Info
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: enabled
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Extensions (8)
A/B Experiments
The text was updated successfully, but these errors were encountered: