Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't show the omitted files in the Test Coverage Toolbar #24366

Open
paduszyk opened this issue Oct 8, 2024 · 3 comments
Open

Don't show the omitted files in the Test Coverage Toolbar #24366

paduszyk opened this issue Oct 8, 2024 · 3 comments
Assignees
Labels
community ask Feature request that the community expressed interest in needs community feedback Awaiting community feedback triage-needed Needs assignment to the proper sub-team

Comments

@paduszyk
Copy link

paduszyk commented Oct 8, 2024

I like the new Test Coverage Toolbar feature. I use it with Python and Coverage.py run via pytest and pytest-cov plugin.

Coverage.py enables omitting some files using globs (e.g. configuration modules or development scripts; see docs). I think that NOT showing those files in the toolbar could be an interesting enhancement.

Sorry if you find this issue biased to Python. I am not so familiar with other languages and testing tools available for them.

@eleanorjboyd
Copy link
Member

good idea yes! I can do this specifically on the python side. This will need development time so just putting it for community feedback to see how many people are hitting this issue

@eleanorjboyd eleanorjboyd transferred this issue from microsoft/vscode Oct 30, 2024
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Oct 30, 2024
@eleanorjboyd eleanorjboyd added needs community feedback Awaiting community feedback community ask Feature request that the community expressed interest in labels Oct 30, 2024
Copy link

Thanks for the feature request! We are going to give the community 60 days from when this issue was created to provide 7 👍 upvotes on the opening comment to gauge general interest in this idea. If there's enough upvotes then we will consider this feature request in our future planning. If there's unfortunately not enough upvotes then we will close this issue.

@eleanorjboyd
Copy link
Member

"Run Test with Coverage" should allow omitting files from the report. Ideally, honor the "omit" setting in the coverage configuration. Some default arguments may be set, such as .venv.

It seems this can be done using a workaround, namely, by using tool.coverage.run.omit (as opposed to tool.coverage.report.omit, which I tried previously).

[tool.coverage.run]
omit = [
    ".venv/*",
    # https://github.com/nedbat/coveragepy/issues/1392
    "pyscript",
    "shibokensupport/*",
    "signature_bootstrap.py",
]

copied from #24309 as both are related to omitting files for coverage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community ask Feature request that the community expressed interest in needs community feedback Awaiting community feedback triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

4 participants
@connor4312 @eleanorjboyd @paduszyk and others