Skip to content

Cannot discover tests anymore, python executable not used #22618

@johansmolinski

Description

@johansmolinski

Type: Bug

Behaviour

Expected vs. Actual

Expected: Clicking the tests icon should discover tests.
Actual: No tests have been found in this workspace yet.

Steps to reproduce:

  1. Load a project previously having tests discovered.
  2. Click the Tests icon.

Diagnostic data

  • Python version (& distribution if applicable, e.g. Anaconda): 3.11.6
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Venv
  • Value of the python.languageServer setting: Default
Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

python /Users/johan/.vscode/extensions/ms-python.python-2023.22.0/pythonFiles/unittestadapter/discovery.py --udiscovery -v -s ./src -p test_*.py

and if I run that myself in the terminal, I get:

Error[vscode-unittest]: TEST_PORT is not set.  TEST_UUID =  None
Error: no uuid provided or parsed.
Error sending response: [Errno 61] Connection refused
Request data: Content-Length: 42
Content-Type: application/json
Request-uuid: 

{"command_type": "discovery", "eot": true}

User Settings


languageServer: "Pylance"

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

Extension version: 2023.22.0
VS Code version: Code 1.85.0 (Universal) (af28b32d7e553898b2a91af498b1fb666fdebe0c, 2023-12-06T18:18:04.614Z)
OS version: Darwin arm64 23.1.0
Modes:

System Info
Item Value
CPUs Apple M1 Max (10 x 24)
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
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) 5, 5, 6
Memory (System) 64.00GB (0.05GB free)
Process Argv . --crash-reporter-id f7b7518c-4fd8-4a0b-b95d-1c10ff2f756b
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627:30244334
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30410667
py29gd2263:30899288
vscaat:30438848
vsclangdc:30486549
c4g48928:30535728
dsvsc012cf:30540253
azure-dev_surveyone:30548225
2e4cg342:30602488
89544117:30613380
2i9eh265:30646982
showlangstatbar:30737416
962ge761:30917236
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
welcomedialogc:30910334
pythonnosmt12:30797651
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
dsvsc013:30795093
dsvsc014:30804076
dsvsc015:30845448
pythontestfixt:30902429
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
pythontbext0:30879054
accentitlementsc:30887149
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
aa_t_chat:30882232
dsvsc019:30917259

Metadata

Metadata

Labels

area-testinginfo-neededIssue requires more information from postertriage-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