-
Notifications
You must be signed in to change notification settings - Fork 1.2k
pytest doubles %PYTHONPATH% in a debug run #13689
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
@schperplata I can reproduce this when I set environment variables using |
In this specific case, I have a .bat file that set PYTHONPATH and open VSC workspace. I figured out this is the simplest way of configuring VSC workspace without mulitplying source paths for pylint, pylance, autocomplete, ... |
Can you please elaborate on what you mean by multiplying source paths?
Does this issue happen when you set |
This is a problem when multiroot workspaces/projects are used or modules anywhere in the project tree must be runnable. If %PYTHONPATH% is set globaly, for example by .bat file, all extensions /VSCode tools can make use of it (Pylance, Pylint, Pytest, ...). All paths are defined at one single place (.bat/.env). Otherwise, user must configure these paths for extensions, for example Pylance
Yes. In fact, this is the way I initially discovered (and reported) the issue. |
Hello! We have just finished our testing rewrite and are beginning the roll out to users. If you are able, it would be very helpful to know if your issue still exists on the rewrite! To try it yourself, you need to be on the most recent release of the Python extension and add this setting to your users You can confirm you have the rewrite enabled by setting Let me know if the rewrite fixes your issue. Thanks! |
Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on, then we will be happy to re-open this issue to pick up where we left off. Happy Coding! |
Issue Type: Bug
If %PYTHONPATH% is set, VSC test (pytest) plugin double %PYTHONPATH% in debug configuration. Not the case with run configuration.
Example (run):
Example (debug):
Doesn't really affect my use case, but I consider this as a bug.
Extension version: 2020.8.105045
VS Code version: Code 1.48.2 (a0479759d6e9ea56afa657e454193f72aef85bd0, 2020-08-25T10:13:11.295Z)
OS version: Windows_NT x64 10.0.19041
System Info
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
The text was updated successfully, but these errors were encountered: