Skip to content

Test explorer disappears every time a test file is saved #26091

Description

Type: Bug

Behaviour

Every time a test file is saved, the test explorer now shows the "No tests have been found" view for a while until the pytest collection completes again.

Additionally, the icons in the gutter disappear and then start playing up when they reappear (trying to click the "run test" icon causes a breakpoint to be added, hovering over the gutter causes the gutter to change width).

This did not used to happen until recently (last fortnight or so).

Steps to reproduce:

  1. Save a test file.

Diagnostic data

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

XXX

Extension version: 2026.4.0
VS Code version: Code 1.120.0 (0958016b2af9f09bb4257e0df4a95e2f90590f9f, 2026-05-12T20:17:22Z)
OS version: Linux x64 5.14.0-611.54.1.el9_7.x86_64
Modes:

  • Python version (& distribution if applicable, e.g. Anaconda): 3.14.4
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Conda
  • Value of the python.languageServer setting: Pylance
User Settings


languageServer: "Pylance"
testing
• pytestArgs: "<placeholder>"
• pytestEnabled: true

Installed Extensions
Extension NameExtension IdVersion
black-formatterms-2026.6.0
copilot-chatGit0.48.1
debugpyms-2026.6.0
even-better-tomltam0.21.2
flake8ms-2026.6.0
git-graphmhu1.30.0
github-vscode-themeGit6.3.5
gitlenseam18.3.0
isortms-2026.7.12041004
jinjahtmlsam0.20.0
js-debugms-1.117.0
js-debug-companionms-1.1.3
jsts-chat-featuresTyp0.0.2
jupyterms-2025.9.1
jupyter-keymapms-1.1.2
jupyter-renderersms-1.3.0
pythonms-2026.4.0
remote-explorerms-0.5.0
remote-serverms-1.5.3
remote-sshms-0.124.0
ruffcha2026.68.0
shebang-language-associatordav1.4.0
shellchecktim0.39.5
simple-rsttro1.5.4
sqlite-viewerqwt25.12.2
vscode-cylccyl1.3.0
vscode-eslintdba3.0.34
vscode-github-actionsgit0.32.3
vscode-js-profile-tablems-1.0.10
vscode-jupyter-cell-tagsms-0.1.9
vscode-jupyter-slideshowms-0.1.6
vscode-markdown-alertyah0.0.4
vscode-pull-request-githubGit0.144.0
vscode-pylancems-2026.3.1
vscode-python-envsms-1.36.0
vscode-yamlred1.24.0
System Info
ItemValue
CPUsAMD EPYC 7763 64-Core Processor (4 x 0)
GPU Status2d_canvas: unavailable_software
GPU0: VENDOR= 0xffff [Google Inc. (Google)], DEVICE=0xffff [ANGLE (Google, Vulkan 1.3.0 (SwiftShader Device (Subzero) (0x0000C0DE)), SwiftShader driver-5.0.0)], DRIVER_VENDOR=SwANGLE, DRIVER_VERSION=5.0.0 ACTIVE
Machine model name:
Machine model version:
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
opengl: disabled_off
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
webgpu: disabled_off
webnn: unavailable_software
Load (avg)2, 2, 2
Memory (System)15.31GB (8.64GB free)
Process Argv
Screen Readerno
VM0%
DESKTOP_SESSIONgnome
XDG_CURRENT_DESKTOPGNOME
XDG_SESSION_DESKTOPundefined
XDG_SESSION_TYPEx11

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions