-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Test explorer position resets after automatic test discovery refresh #23186
Comments
Hi @yawhide, sorry for the delay. Do you know specifically which version this used to work on? I have not made updates in this area recently but it could be a change coming from core. Thanks |
I think it was pre-2024 versions. i think ever since 2024+ versions, the test discovery & test explorer have been a bit 'janky' |
@connor4312, do you have any ideas here? I looked through all my changes in the past 5 months (since 2023.20.0 was release 5 months ago) and most of the files having to do with populating the test tree I have not touched. Is there anything upstream that might have changed how refresh loads test cases and if someone's "place" in the tree is kept? |
Also I tried this on the most recent pre-release and am seeing this behavior which seems to be correct? Is there something with my repro that isn't right? test-explorer-moving.mov |
so i cloned some popular python code bases like flask and sqlalchemy and I cant reproduce the problem there 🤔 it seems to be a problem local to my own codebase. not sure why its happening. |
hm very interesting! I would check your settings or clear them out for the workspace and see if that makes a difference. Good luck, thanks for taking a look! |
Type: Bug
Behaviour
I like to look at the test explorer when writing/fixing test cases. I right-click the green checkmark and click
Reveal in test explorer
. I then edit a test case and save the file. Test discovery runs in the background and resets the test explorer tree. It also resets my position in the test explorer. Previous versions of the python extension did not have this issue so there is a regression here.Steps to reproduce:
Reveal in test explorer
. Ensure you have a decent amount of tests so test case isnt at the top of the tree.Diagnostic data
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Extension version: 2024.4.0
VS Code version: Code 1.87.2 (863d2581ecda6849923a2118d93a088b0745d9d6, 2024-03-08T15:20:57.520Z)
OS version: Darwin arm64 23.3.0
Modes:
python.languageServer
setting: PylanceUser 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
webgl: enabled
webgl2: enabled
webgpu: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: