Inconsistent behaviour when running parameterized tests via code lens and menu bar #20977
Labels
area-testing
info-needed
Issue requires more information from poster
triage-needed
Needs assignment to the proper sub-team
Type: Bug
Behaviour
When I start a pytest-test the uses a parameterized fixture from the code lens (or however the small icon next to the line number is called) test, it starts the test session twice.
This doesn't happen when you start the same test from the menu-bar.
For me this is critical because I create some docker containers on each start of the test session, which doesn't work any more on the second try, because of conflicting names.
I would like the menu-bar behaviour to be used for both cases.
At first i though this could be related to this issue: #6043
But as I am using pytest and not Nosetest, I don't think that this is the case, even though it sounds similiar.
Expected vs. Actual
Expected: Even though the fixture is parameterized, the test session should only be started once.
Actual: Two separate test sessions are started.
Steps to reproduce:
Create the following file
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.4.1
VS Code version: Code - OSS 1.76.2 (ee2b180d582a7f601fa6ecfdad8d9fd269ab1884, 2023-03-16T10:00:00.439Z)
OS version: Linux x64 6.1.21-1-MANJARO
Modes:
Sandboxed: No
System Info
canvas_oop_rasterization: disabled_off
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_renderer: enabled_on
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
The text was updated successfully, but these errors were encountered: