Repository navigation
After latest update: Testing tree of python tests reloads completely rather than just update #25822
Description
Activity
- assigned and unassigned
on Feb 25, 2026 thanks will take a look!
- addedtriage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
on Feb 27, 2026 - addedbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugconfirmation pendingThe issue needs to be confirmed through a maintainer reproducing the bug.The issue needs to be confirmed through a maintainer reproducing the bug.and removedtriage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
on Mar 13, 2026 Same here on:
Version: 1.111.0 Commit: ce099c1ed25d9eb3076c11e4a280f3eb52b4fbeb Date: 2026-03-06T23:06:10Z Electron: 39.6.0 ElectronBuildId: 13330601 Chromium: 142.0.7444.265 Node.js: 22.22.0 V8: 14.2.231.22-electron.0 OS: Linux x64 6.19.6-arch1-1and
ms-python.python 2026.4.0On my second machine with older packages this does not happen:
Version: 1.108.2 Commit: c9d77990917f3102ada88be140d28b038d1dd7c7 Date: 2026-01-21T13:52:09.270Z Electron: 39.2.7 ElectronBuildId: 12953945 Chromium: 142.0.7444.235 Node.js: 22.21.1 V8: 14.2.231.21-electron.0 OS: Linux x64 6.18.5-arch1-1ms-python.python 2026.4.0, too.Still broken on:
Version: 1.111.0
Commit: ce099c1ed25d9eb3076c11e4a280f3eb52b4fbeb
Date: 2026-03-06T23:06:10Z
Electron: 39.6.0
ElectronBuildId: 13330601
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Linux x64 6.17.0-19-genericSame config as one of my own installs. I stick with 1.108.2 for now.
I have the same issue. It's especially annoying because it takes a while for the collection to finish, and in the mean time, simple things like re-running the same test, or debugging a test just fail, because the test has been cleared.
The same issue occurs to me in one specific repository, when VSCode is open via Dev Containers. I found out the
python.testing.autoTestDiscoverOnSaveEnabledoption, which is enabled by default. Disable it to have control on when the tests are reloadedMy workspace included a folder with a large number of files. After explicitly limiting which folders vs code searches for tests in (thus excluding the folder with numerous nested dirs), the delay when reloading has improved, but it is still there.
This allowed me to keep autoTestDiscoverOnSaveEnabled for now.
A fix might be to incrementally reload the test tree, rather than just replacing it? Test discovery could run in the background, do a diff between discovered tests and the existing test tree in the GUI and just insert/remove?
Same here! Several updates later and it still happens:
Version: 1.131.0 (system setup)
Commit: e4c7e7b1d6d060162f4aa7f8225271b67ce1df75
Date: 2026-07-28T10:51:25Z
Electron: 42.7.0
ElectronBuildId: 14710161
Chromium: 148.0.7778.280
Node.js: 24.18.0
V8: 14.8.178.38-electron.0
OS: Windows_NT x64 10.0.26200
Does this issue occur when all extensions are disabled?: Yes/No
Commit: 072586267e68ece9a47aa43f8c108e0dcbf44622
Date: 2026-02-19T19:43:32.382Z
Electron: 39.3.0
ElectronBuildId: 13313481
Chromium: 142.0.7444.265
Node.js: 22.21.1
V8: 14.2.231.22-electron.0
OS: Linux x64 6.17.0-14-generic
Prior to the latest update (I think, I've been coding in the typescript part of my codebase for a couple of weeks and just recently returned to the python part) changing code would discover new tests and update the test-tree in the Testing view in situ, ie adding a new test-method and saving would cause it to appear in the list of tests.
Now, any change (even just adding an empty line in a random, non-test feil, as in the video below) will cause the entire "Python Tests" tree to be removed and then rebuild from scratch, see video below. This causes flicker and delays from saving a file to being able to find the test and re-run it. The vitest part of the tests does not have this issue, leading me to think it an issue specific to python and python test discovery/updating of test list in Testing view
No changes in project setup or extensions prior to this issue appearing. Tried "Python: Clear cache and Reload window" and multiple restarts of VS Code.
Steps to Reproduce:
Output log from Python during a save attached
Python-after-save-file.log