Skip to content
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 discovery hangs indefinitely with WSL2 and uv venv #24932

Closed
bewing opened this issue Mar 26, 2025 · 3 comments
Closed

Test discovery hangs indefinitely with WSL2 and uv venv #24932

bewing opened this issue Mar 26, 2025 · 3 comments
Labels
feature-request Request for new features or functionality triage-needed Needs assignment to the proper sub-team

Comments

@bewing
Copy link

bewing commented Mar 26, 2025

Type: Bug

Behaviour

Attempting to discover tests hangs indefinitely

Steps to reproduce:

  1. Clone several git repositories into a new, empty folder
  2. Manually create venv in folder via uv venv --python 3.11.11
  3. Launch vscode in folder, select python venv interpreter
  4. Configure pytest tests
  5. Click on test icon in left bar

Diagnostic data

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

2025-03-26 14:39:02.945 [info] Experiment 'pythonRecommendTensorboardExt' is active
2025-03-26 14:39:02.946 [info] Experiment 'pythonSurveyNotificationcf' is active
2025-03-26 14:39:02.946 [info] Experiment 'pythonTerminalEnvVarActivation' is active
2025-03-26 14:39:02.946 [info] Experiment 'pythonTestAdapter' is active
2025-03-26 14:39:02.946 [info] Native locator: Refresh started
2025-03-26 14:39:02.960 [info] Poetry environment manager found at: /home/bewing/.local/share/pypoetry/venv/bin/poetry
2025-03-26 14:39:03.135 [info] Native locator: Refresh finished in 644 ms
2025-03-26 14:39:03.139 [info] Python interpreter path: ./.venv/bin/python
2025-03-26 14:39:04.669 [info] > pyenv which python
2025-03-26 14:39:04.669 [info] cwd: .
2025-03-26 14:39:06.551 [info] > . ./.venv/bin/activate && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python ~/.vscode-server-insiders/extensions/ms-python.python-2025.3.2025032601-linux-x64/python_files/printEnvVariables.py
2025-03-26 14:39:06.551 [info] shell: bash
2025-03-26 14:39:06.722 [info] > /bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2025.3.2025032601-linux-x64/python_files/printEnvVariables.py
2025-03-26 14:39:06.722 [info] shell: bash
2025-03-26 14:39:07.083 [info] Setting environment variable VIRTUAL_ENV in collection to /home/bewing/Projects/naac/.venv {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2025-03-26 14:39:07.083 [info] Setting environment variable VIRTUAL_ENV_PROMPT in collection to (naac)  {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2025-03-26 14:39:07.083 [info] Prepending environment variable PS1 in collection with (naac)  {"applyAtShellIntegration":true,"applyAtProcessCreation":false}
2025-03-26 14:39:07.083 [info] Prepending environment variable PATH in collection with /home/bewing/.vscode-server-insiders/extensions/ms-python.python-2025.3.2025032601-linux-x64/python_files/deactivate/bash:/home/bewing/Projects/naac/.venv/bin: {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2025-03-26 14:39:07.084 [info] Send text to terminal: /bin/python /home/bewing/.vscode-server-insiders/extensions/ms-python.python-2025.3.2025032601-linux-x64/python_files/printEnvVariablesToFile.py /home/bewing/.vscode-server-insiders/extensions/ms-python.python-2025.3.2025032601-linux-x64/python_files/deactivate/bash/envVars.txt
2025-03-26 14:39:07.987 [info] Starting Pylance language server.
2025-03-26 14:39:18.998 [debug] Testing: Refreshing all test data
2025-03-26 14:39:18.999 [info] Discover tests for workspace name: naac - uri: /home/bewing/Projects/naac
2025-03-26 14:39:19.004 [debug] Starting Test Discovery named pipe

Extension version: 2025.3.2025032601
VS Code version: Code - Insiders 1.99.0-insider (87a35e10699cb846c2c72eeb3a698bf56dafd701, 2025-03-26T05:03:45.940Z)
OS version: Windows_NT x64 10.0.22000
Modes:
Remote OS version: Linux x64 5.15.167.4-microsoft-standard-WSL2

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


languageServer: "Pylance"

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

terminal
• launchArgs: "<placeholder>"

Installed Extensions
Extension Name Extension Id Version
ansible red 25.3.1
black-formatter ms- 2025.2.0
debugpy ms- 2025.5.2025031101
django-intellisense sha 0.0.2
django-test-runner Pac 4.0.2
doxdocgen csc 1.4.0
even-better-toml tam 0.21.2
file-downloader min 1.0.13
gitblame wad 11.1.2
gitlab-workflow Git 5.13.0
gitlens eam 16.3.3
go gol 0.46.1
isort ms- 2023.10.1
js-debug ms- 1.97.1
jsoncrack-vscode Ayk 3.0.0
jupyter ms- 2025.2.0
jupyter-renderers ms- 1.1.0
prettier-vscode esb 11.0.0
python ms- 2025.3.2025032601
Rcf-VS-Code-Plugin ari 4.32.2
reflow-markdown mar 3.1.0
shellcheck tim 0.37.7
svn-scm joh 2.17.0
vscode-docker ms- 1.29.4
vscode-js-profile-table ms- 1.0.10
vscode-jupyter-cell-tags ms- 0.1.9
vscode-jupyter-slideshow ms- 0.1.6
vscode-kubernetes-tools ms- 1.3.20
vscode-markdownlint Dav 0.59.0
vscode-pull-request-github Git 0.106.0
vscode-pylance ms- 2025.3.103
vscode-xml red 0.28.2025031108
vscode-yaml red 1.17.0
win-ca uko 3.5.1
xml Dot 2.5.1
System Info
Item Value
CPUs Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz (40 x 2195)
GPU Status 2d_canvas: enabled
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
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 94.66GB (63.75GB free)
Process Argv --crash-reporter-id 14b65026-3b4e-4592-bbc1-17245674ffe8
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu
OS Linux x64 5.15.167.4-microsoft-standard-WSL2
CPUs Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz (40 x 0)
Memory (System) 46.38GB (41.01GB free)
VM 0%
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt551cf:31249598
vscod805cf:30301675
py29gd2263:31024238
c4g48928:30535728
vscrp:30624060
a9j8j154:30646983
962ge761:30841072
dsvsc014:30777825
dsvsc015:30821418
h48ei257:31000450
pythontbext0:30879054
cppperfnew:30980852
dwnewjupyter:31046869
nativerepl1:31134653
pythonrstrctxt:31093868
nativeloc1:31118317
e80f6927:31120813
iacca1:31150324
dwcopilot:31158714
c3hdf307:31184662
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
9064b325:31222308
copilot_t_ci:31222730
850i5325:31264362
g012b348:31231168
jda6j935:31233686
copilothoveron:31262361
pythoneinst12:31251391
bgtreat:31252123
fh1c7952:31247580
31787653:31262186
3e8i5726:31266632
pythonpulldiag:31258010
6gi0g917:31259950
editor719:31268331
996jf627:31264550
pythonrdcb7:31268811

@bewing bewing added the feature-request Request for new features or functionality label Mar 26, 2025
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Mar 26, 2025
@bewing
Copy link
Author

bewing commented Mar 26, 2025

Adding
"python.experiments.optOutFrom": ["pythonTestAdapter"]

to settings.json does not alter behavior

@bewing
Copy link
Author

bewing commented Mar 26, 2025

I have also tried:

closing all vscode insider instances
uninstalling vscode insider
removing ~/.vscode-insider/extensions
re-installing vscode insider
re-opening the project in WSL vscode insider

still hangs.

@bewing
Copy link
Author

bewing commented Mar 26, 2025

Nuking ~/.vscode-server-insiders inside WSL2 appears to have resolved.

@bewing bewing closed this as completed Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

1 participant