Skip to content

tests are not being discovered #22018

@gbajson-area22

Description

@gbajson-area22

Type: Bug

Tests for python project are not appearing in VS Code.

In the terminal output I foud the command that is executed.
This command returns proper tests

$ ~/.cache/pypoetry/virtualenvs/vox-7_rKBGgW-py3.11/bin/python ~/.vscode/extensions/ms-python.python-2023.16.0/pythonFiles/testing_tools/run_adapter.py discover pytest -- --rootdir . -s --cache-clear .
[{"rootid": ".", "root": "/storage/amoje/Sync/area22/vox2", "parents": [{"id": "./src", "kind": "folder", "name": "src", "parentid": ".", "relpath": "./src"}, {"id": "./src/vox", "kind": "folder", "name": "vox", "parentid": "./src", "relpath": "./src/vox"}, {"id": "./src/vox/test_main.py", "kind": "file", "name": "test_main.py", "parentid": "./src/vox", "relpath": "./src/vox/test_main.py"}], "tests": [{"id": "./src/vox/test_main.py::test_read_main", "name": "test_read_main", "source": "./src/vox/test_main.py:13", "markers": [], "parentid": "./src/vox/test_main.py"}, {"id": "./src/vox/test_main.py::test_comedy_tom_hanks", "name": "test_comedy_tom_hanks", "source": "./src/vox/test_main.py:20", "markers": [], "parentid": "./src/vox/test_main.py"}]}]

VS Code version: Code 1.82.2 (abd2f3db4bdb28f9e95536dfa84d8479f1eb312d, 2023-09-14T05:51:20.981Z)
OS version: Linux x64 6.2.0-32-generic snap
Modes:

System Info
Item Value
CPUs AMD Ryzen 9 5900X 12-Core Processor (24 x 2200)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
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: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) 0, 1, 1
Memory (System) 62.71GB (51.43GB free)
Process Argv --no-sandbox --force-user-env --unity-launch --crash-reporter-id cccdcc23-b3ed-4860-8b66-fadc67e8d915
Screen Reader no
VM 0%
DESKTOP_SESSION ubuntu
XDG_CURRENT_DESKTOP Unity
XDG_SESSION_DESKTOP ubuntu
XDG_SESSION_TYPE x11
Extensions (43)
Extension Author (truncated) Version
terraform 4op 0.2.5
vscode-markdownlint Dav 0.51.0
gitlens eam 14.3.0
remotehub Git 0.60.0
go gol 0.39.1
terraform has 2.27.2
vscode-python-timeit Has 1.3.8
file-downloader min 1.0.12
prettify-json moh 0.0.3
black-formatter ms- 2023.4.1
isort ms- 2023.10.1
pylint ms- 2023.6.0
python ms- 2023.16.0
vscode-pylance ms- 2023.9.10
jupyter ms- 2023.8.1002501831
jupyter-keymap ms- 1.1.2
jupyter-renderers ms- 1.0.17
vscode-jupyter-cell-tags ms- 0.1.8
vscode-jupyter-slideshow ms- 0.1.5
remote-containers ms- 0.309.0
remote-ssh ms- 0.106.4
remote-ssh-edit ms- 0.86.0
remote-wsl ms- 0.81.3
vscode-remote-extensionpack ms- 0.24.0
azure-repos ms- 0.36.0
remote-explorer ms- 0.4.1
remote-repositories ms- 0.38.1
remote-server ms- 1.4.3
remote-kubernetes Okt 0.4.10
vscode-circular-dependencies-finder ole 1.1.0
r-debugger RDe 0.5.4
java red 1.22.1
vscode-yaml red 1.14.0
markdown-preview-enhanced shd 0.7.9
intellicode-api-usage-examples Vis 0.2.8
vscodeintellicode Vis 1.2.30
keyoti-changeallendoflinesequence vs- 0.0.3
vscode-java-debug vsc 0.54.0
vscode-java-dependency vsc 0.23.1
vscode-java-pack vsc 0.25.14
vscode-java-test vsc 0.39.1
vscode-maven vsc 0.42.0
markdown-all-in-one yzh 3.5.1
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30410667
vsclangdc:30486549
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyone:30548225
vscccc:30803845
282f8724:30602487
89544117:30613380
showlangstatbar:30737416
962ge761:30835153
03d35959:30757346
pythonfmttext:30731395
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
pythonnosmt12:30797651
pythonidxpt:30805730
pythonnoceb:30805159
asynctok:30821568
dsvsc013:30795093
dsvsc014:30804076
diffeditorv1:30821571
dsvsc015:30829745

Metadata

Metadata

Assignees

Labels

area-testingbugIssue identified by VS Code Team member as probable buginfo-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