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
Hi, I am seeing an issue in a multiroot workspace python monorepo, where Refresh Tests properly rescans all my python project tests but when test discovery on save runs, pytest collection is using an incorrect (often just the first) workspace's root as CWD.
Expected vs. Actual
Expected: Test discovery on save should use CWD based on root of workspace containing the opened/saved file. Or at least it should retrigger all workspace test disocovery using its respective CWD like with Refresh Test.
Actual: On save, pytest collects from the workspaceFolder of the first workspace I have, leading to errors that wipes any collected tests from "Refresh Tests". "Refresh Tests" is the only way I can get test explorer to repopulate.
Steps to reproduce:
Create a multiroot workspace with >1 root (example, 2 workspaces A and B) with the follow config
Hello! This seems the same as #22218. I have just put in a fix on the pre-release version of the vscode-python extension and it is out today. Are you able to try it and see if that fixed it? Sorry for the delay in communicating that I was working on this issue!
Type: Bug
Behaviour
Hi, I am seeing an issue in a multiroot workspace python monorepo, where Refresh Tests properly rescans all my python project tests but when test discovery on save runs, pytest collection is using an incorrect (often just the first) workspace's root as CWD.
Expected vs. Actual
Expected: Test discovery on save should use CWD based on root of workspace containing the opened/saved file. Or at least it should retrigger all workspace test disocovery using its respective CWD like with Refresh Test.
Actual: On save, pytest collects from the workspaceFolder of the first workspace I have, leading to errors that wipes any collected tests from "Refresh Tests". "Refresh Tests" is the only way I can get test explorer to repopulate.
Steps to reproduce:
Diagnostic data
python.languageServer
setting: PylanceOutput for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)User Settings
Extension version: 2023.18.0
VS Code version: Code 1.83.0 (Universal) (e7e037083ff4455cf320e344325dacb480062c3c, 2023-10-03T16:13:15.449Z)
OS version: Darwin arm64 21.6.0
Modes:
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
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: