Skip to content

Python Test unable to file with coverage information #24284

@Alphastrick

Description

@Alphastrick

Type: Bug

Behaviour

After configuring the python addon and running some test cases including coverage analysis, the source files can not be inspected with coverage information. Instead, an error message is showing up stating that the file can not be found. File path: /src/path/to/file.py.
It seems like an additional / is added.

Steps to reproduce:

  1. create a project with a source and a test directory
  2. configure the addon to run tests from the test directory with the source directory added
  3. run the tests with coverage analysis
  4. try to open the source file via the Test Coverage view

Diagnostic data

No

Extension version: 2024.16.1
VS Code version: Code 1.94.1 (e10f2369d0d9614a452462f2e01cdc4aa9486296, 2024-10-05T05:44:32.189Z)
OS version: Windows_NT x64 10.0.19045
Modes:

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


languageServer: "Pylance"

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

Installed Extensions
Extension Name Extension Id Version
AsciiDoc asciidoctor.asciidoctor-vscode 3.3.1
Ayu teabyii.ayu 1.0.5
Better C++ Syntax jeff-hykin.better-cpp-syntax 1.27.1
Carbon Product Icons antfu.icons-carbon 0.2.6
Code Spell Checker streetsidesoftware.code-spell-checker 3.0.1
Dev Containers ms-vscode-remote.remote-containers 0.388.0
Diff Folders L13RARY.l13-diff 1.3.8
German - Code Spell Checker streetsidesoftware.code-spell-checker-german 2.3.2
GitHub Copilot GitHub.copilot 1.237.0
GitHub Copilot Chat GitHub.copilot-chat 0.21.1
GitHub Theme GitHub.github-vscode-theme 6.3.5
GitLab Workflow GitLab.gitlab-workflow 5.15.0
GitLens — Git supercharged eamodio.gitlens 15.6.0
Hex Editor ms-vscode.hexeditor 1.10.0
isort ms-python.isort 2023.10.1
JavaScript Debugger ms-vscode.js-debug 1.94.0
JavaScript Debugger Companion Extension ms-vscode.js-debug-companion 1.1.3
Live Preview ms-vscode.live-server 0.4.15
Mermaid Markdown Syntax Highlighting bpruitt-goddard.mermaid-markdown-syntax-highlighting 1.6.6
Mermaid Preview vstirbu.vscode-mermaid-preview 1.6.3
One Dark Pro zhuangtongfa.material-theme 3.17.5
PlantUML jebbs.plantuml 2.18.1
Prettify JSON mohsen1.prettify-json 0.0.3
Pylance ms-python.vscode-pylance 2024.10.1
Python ms-python.python 2024.16.1
Python Debugger ms-python.debugpy 2024.10.0
Python Environment Manager donjayamanne.python-environment-manager 1.2.4
Studio Icons jtlowe.vscode-icon-theme 1.6.6
SVG jock.svg 1.5.4
Table Visualizer for JavaScript Profiles ms-vscode.vscode-js-profile-table 1.0.10
vscode-pdf tomoki1207.pdf 1.2.2
YAML redhat.vscode-yaml 1.15.0
System Info
Item Value
CPUs Intel(R) Core(TM) i9-10885H CPU @ 2.40GHz (16 x 2400)
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) 63.78GB (42.87GB free)
Process Argv --crash-reporter-id e8eead7d-03c6-439f-881a-5e2682a5f202
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
vscaat:30438848
c4g48928:30535728
azure-dev_surveyone:30548225
vscrpc:30673769
962ge761:30959799
pythongtdpath:30769146
pythonnoceb:30805159
asynctok:30898717
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
accentitlementst:30995554
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
jg8ic977:31013176
a69g1124:31058053
dvdeprecation:31068756
dwnewjupyter:31046869
2f103344:31071589
impr_priority:31102340
nativerepl2:31139839
refactort:31108082
pythonrstrctxt:31112756
wkspc-onlycs-t:31132770
wkspc-ranged-t:31151552
cf971741:31144450
defaultse:31146405
iacca2:31150323
notype1:31151523
5fd0e150:31155592

Metadata

Metadata

Assignees

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