Skip to content

Test Discovery fails with unittests #25448

@irenepc

Description

@irenepc

Type: Bug

Behaviour

Seemingly regardless of configurations, I get the error in the output panel regarding not being able to read properties of null.
This happens whenever I try to discover tests in my multi-root project. I'm guessing I get the error once for each root it fails to discover tests on?

Steps to reproduce:

  1. Attempt test discovery on a multi-root project?

I have tried changes in configuration, but they seem to have no effect, or give any different errors.

Diagnostic data

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

2025-09-08 04:55:08.864 [info] > pyenv which python
2025-09-08 04:55:08.865 [info] cwd: y:\irenec\vscode
2025-09-08 04:55:12.270 [info] Active interpreter [y:\irenec\vscode]: c:\Python311\python.exe
2025-09-08 04:55:12.270 [info] Active interpreter [y:\irenec\dev\pipeline\src]: c:\Python311\python.exe
2025-09-08 04:55:12.271 [info] Active interpreter [y:\irenec\dev\pipelaunch\pipelaunch]: c:\Python311\python.exe
2025-09-08 04:55:12.272 [info] Discover tests for workspace name: vscode - root - uri: y:\irenec\vscode
2025-09-08 04:55:12.273 [info] Discover tests for workspace name: pipeline - uri: y:\irenec\dev\pipeline\src
2025-09-08 04:55:12.273 [info] Discover tests for workspace name: pipelaunch - uri: y:\irenec\dev\pipelaunch\pipelaunch
2025-09-08 04:55:13.018 [error] Test Discovery named pipe \.\pipe\python-test-discovery-c10f207410eb3ea75b73 error: TypeError: Cannot read properties of null (reading 'path')
at e (c:\Users\irenec.vscode\extensions\ms-python.python-2025.12.0-win32-x64\out\client\extension.js:2:967372)
at t.PythonResultResolver._resolveDiscovery (c:\Users\irenec.vscode\extensions\ms-python.python-2025.12.0-win32-x64\out\client\extension.js:2:951953)
at t.PythonResultResolver.resolveDiscovery (c:\Users\irenec.vscode\extensions\ms-python.python-2025.12.0-win32-x64\out\client\extension.js:2:951037)
at c:\Users\irenec.vscode\extensions\ms-python.python-2025.12.0-win32-x64\out\client\extension.js:2:1001847
at _._callback (c:\Users\irenec.vscode\extensions\ms-python.python-2025.12.0-win32-x64\out\client\extension.js:2:966565)
at b.callback (c:\Users\irenec.vscode\extensions\ms-python.python-2025.12.0-win32-x64\out\client\extension.js:2:227145)
at Object.thunk (c:\Users\irenec.vscode\extensions\ms-python.python-2025.12.0-win32-x64\out\client\extension.js:2:2032978)
2025-09-08 04:55:13.021 [error] Test Discovery named pipe \.\pipe\python-test-discovery-4d9602ac96f2e0990b34 error: TypeError: Cannot read properties of null (reading 'path')
at e (c:\Users\irenec.vscode\extensions\ms-python.python-2025.12.0-win32-x64\out\client\extension.js:2:967372)
at t.PythonResultResolver._resolveDiscovery (c:\Users\irenec.vscode\extensions\ms-python.python-2025.12.0-win32-x64\out\client\extension.js:2:951953)
at t.PythonResultResolver.resolveDiscovery (c:\Users\irenec.vscode\extensions\ms-python.python-2025.12.0-win32-x64\out\client\extension.js:2:951037)
at c:\Users\irenec.vscode\extensions\ms-python.python-2025.12.0-win32-x64\out\client\extension.js:2:1001847
at _._callback (c:\Users\irenec.vscode\extensions\ms-python.python-2025.12.0-win32-x64\out\client\extension.js:2:966565)
at b.callback (c:\Users\irenec.vscode\extensions\ms-python.python-2025.12.0-win32-x64\out\client\extension.js:2:227145)
at Object.thunk (c:\Users\irenec.vscode\extensions\ms-python.python-2025.12.0-win32-x64\out\client\extension.js:2:2032978)
2025-09-08 04:55:14.575 [info] Starting Pylance language server.
2025-09-08 04:55:18.882 [error] Test Discovery named pipe \.\pipe\python-test-discovery-a875b4296ff110b8e494 error: TypeError: Cannot read properties of null (reading 'path')
at e (c:\Users\irenec.vscode\extensions\ms-python.python-2025.12.0-win32-x64\out\client\extension.js:2:967372)
at t.PythonResultResolver._resolveDiscovery (c:\Users\irenec.vscode\extensions\ms-python.python-2025.12.0-win32-x64\out\client\extension.js:2:951953)
at t.PythonResultResolver.resolveDiscovery (c:\Users\irenec.vscode\extensions\ms-python.python-2025.12.0-win32-x64\out\client\extension.js:2:951037)
at c:\Users\irenec.vscode\extensions\ms-python.python-2025.12.0-win32-x64\out\client\extension.js:2:1001847
at _._callback (c:\Users\irenec.vscode\extensions\ms-python.python-2025.12.0-win32-x64\out\client\extension.js:2:966565)
at b.callback (c:\Users\irenec.vscode\extensions\ms-python.python-2025.12.0-win32-x64\out\client\extension.js:2:227145)
at Object.thunk (c:\Users\irenec.vscode\extensions\ms-python.python-2025.12.0-win32-x64\out\client\extension.js:2:2032978)

Extension version: 2025.12.0
VS Code version: Code 1.103.2 (6f17636121051a53c88d3e605c491d22af2ba755, 2025-08-20T16:45:34.255Z)
OS version: Windows_NT x64 10.0.19045
Modes:

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

Multiroot scenario, following user settings may not apply:

languageServer: "Pylance"

testing
• unittestArgs: "<placeholder>"
• unittestEnabled: true

Installed Extensions
Extension Name Extension Id Version
auto-comment-blocks kev 1.0.1
autodocstring njp 0.6.1
copilot Git 1.364.0
copilot-chat Git 0.30.3
debugpy ms- 2025.10.0
extendscript-debug Ado 2.1.0
gitlens eam 17.4.1
js-debug ms- 1.102.0
js-debug-companion ms- 1.1.3
python ms- 2025.12.0
vscode-js-profile-table ms- 1.0.10
vscode-pull-request-github Git 0.116.2
vscode-pylance ms- 2025.7.1
vscode-python-envs ms- 1.2.0
System Info
Item Value
CPUs Intel(R) Xeon(R) W-2225 CPU @ 4.10GHz (8 x 4104)
GPU Status 2d_canvas: enabled
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
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 63.69GB (49.00GB free)
Process Argv Y:\irenec\vscode\irenec_pipelaunch20.code-workspace --crash-reporter-id 0f3862e7-250e-488d-8961-f1c20f56d1d7
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
996jf627:31283433
pythonrdcb7:31342333
usemplatestapi:31297334
aj953862:31281341
nesew2to5:31336538
agentclaude:31374413
nes-set-on:31340697
63221493:31336333
0927b901:31350571
aa_t:31379598
45650338:31358607
0cj2b977:31352657
gemagent1:31368469
cloudbuttont:31379625
retryenabled:31370050
3efgi100_wstrepl:31374188
trigger-command-fix:31379601

Metadata

Metadata

Assignees

Labels

triage-neededNeeds assignment to the proper sub-team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions