forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugneeds PRReady to be worked onReady to be worked on
Description
Type: Bug
Behaviour
In python_files/vscode_pytest/init.py:
has_pytest_cov = early_config.pluginmanager.hasplugin("pytest_cov")
assumes that the plugin was loaded using its entry point name, but it can also be loaded via its module name:
[project.entry-points.pytest11]
pytest_cov = "pytest_cov.plugin"
This should be an easy fix to check for both, but I don't have time at the moment to look into how to test a patch for this in the repo, so filing an issue for this in case it is easier for someone else to address.
Thank you so much!
Steps to reproduce:
- Disable all plugin loading in pytest using --disable-plugin-autoload
- Load pytest-cov directly using -p pytest_cov.plugin
- Observe that test collections fails since it thinks pytest-cov isn't available.
Diagnostic data
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
XXX
Extension version: 2025.17.2025101701
VS Code version: Code - Insiders 1.106.0-insider (Universal) (ec8586ef251f560f4deaaa205d67bc32213b5055, 2025-10-17T05:29:03.941Z)
OS version: Darwin arm64 24.6.0
Modes:
- Python version (& distribution if applicable, e.g. Anaconda): 3.12.6
- Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Venv
- Value of the
python.languageServersetting: Default
User Settings
languageServer: "Pylance"
testing
• pytestArgs: "<placeholder>"
• pytestEnabled: true
Installed Extensions
| Extension Name | Extension Id | Version |
|---|---|---|
| copilot | Git | 1.383.1811 |
| copilot-chat | Git | 0.33.2025101701 |
| debugpy | ms- | 2025.15.2025101301 |
| js-debug | ms- | 1.105.0 |
| js-debug-companion | ms- | 1.1.3 |
| jupyter | ms- | 2025.10.2025101002 |
| jupyter-keymap | ms- | 1.1.2 |
| jupyter-renderers | ms- | 1.3.2025062701 |
| python | ms- | 2025.17.2025101701 |
| vim | vsc | 1.31.0 |
| vscode-js-profile-table | ms- | 1.0.10 |
| vscode-jupyter-cell-tags | ms- | 0.1.9 |
| vscode-jupyter-slideshow | ms- | 0.1.6 |
| vscode-pylance | ms- | 2025.8.100 |
| vscode-python-envs | ms- | 1.11.12871008 |
System Info
| Item | Value |
|---|---|
| CPUs | Apple M3 Pro (12 x 2400) |
| 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: enabled_on trees_in_viz: disabled_off video_decode: enabled video_encode: enabled webgl: enabled webgl2: enabled webgpu: enabled webnn: disabled_off |
| Load (avg) | 3, 5, 4 |
| Memory (System) | 36.00GB (0.08GB free) |
| Process Argv | |
| Screen Reader | no |
| VM | 0% |
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugneeds PRReady to be worked onReady to be worked on