Skip to content

Python test coverage skip some valid files #24351

@senese

Description

@senese

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version:
    code --version
    1.94.1
    e10f2369d0d9614a452462f2e01cdc4aa9486296
    x64
  • OS Version:
    cat /etc/os-release
    PRETTY_NAME="Ubuntu 22.04.1 LTS"
    NAME="Ubuntu"
    VERSION_ID="22.04"
    VERSION="22.04.1 LTS (Jammy Jellyfish)"

Steps to Reproduce:

  1. Have a Python project in place and it's requirements installed
  • Python Version: 3.12.3
  • Pytest version: 8.3.2
  • Pytest-cov version: 5.0.0
  1. Configure VS Code to use Pytest
  2. The only testing parameters setted are:
    settings.json
    "python.testing.pytestArgs": [
        "tests",
        "-vv"
    ],

and pyproject.toml

[tool.coverage.run]
omit = ["tests/*"]
  1. Click on Run Tests with Coverage on Test Explorer tab.
  2. Some files (which coincidentally or not are just class definitions) are not included by test coverage thus don't have the progress bar; and others that don't have any coverage are included.
    Image
    Image

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