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
When a pytest test is launched using the "Run Test" Button/Command the environment of the selected virtualenv appears not to be set. This contrasts with the behaviour when "Debug Test" Button/Command is used where the Venv environment is used. This will (for example) break test suites relying on finding executables installed in the virtualenv bin directory on PATH.
Steps to reproduce:
Create small pytest test suite.
print(os.environ) in test.
import os
def test_environ():
print("PATH", os.environ["PATH"])
It doesn't seem to cover the aspect that inconsistent launch environments between Run test and Debug test (definately not right). I'll add a comment in #23408.
Type: Bug
Behaviour
When a pytest test is launched using the "Run Test" Button/Command the environment of the selected virtualenv appears not to be set. This contrasts with the behaviour when "Debug Test" Button/Command is used where the Venv environment is used. This will (for example) break test suites relying on finding executables installed in the virtualenv bin directory on PATH.
Steps to reproduce:
See attached output captured from run.
Debug_test_run_output.log
Run_test_run_output.log
Diagnostic data
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Extension version: 2024.6.0
VS Code version: Code 1.89.1 (dc96b837cf6bb4af9cd736aa3af08cf8279f7685, 2024-05-07T05:13:33.891Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Remote OS version: Linux x64 5.15.146.1-microsoft-standard-WSL2
python.languageServer
setting: DefaultUser Settings
Installed Extensions
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: