You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Don't show the omitted files in the Test Coverage Toolbar #24366
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.
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
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.
"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).
But, to be honest, the difference is not clear to me. I use the latter, as it sounds more logical to me to use report section to affect the behavior referred to coverage reports.
Besides, I prefer pyproject.toml as the configuration "hub". I don't think however this can be an issue here.
Activity
eleanorjboyd commentedon Oct 30, 2024
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
github-actions commentedon Oct 30, 2024
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 commentedon Oct 30, 2024
"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).
copied from #24309 as both are related to omitting files for coverage
eleanorjboyd commentedon Nov 13, 2024
Hi Kamil Paduszyński (@paduszyk)! In what way did you configure your file to omit? I did the most basic setup and it worked for me:
paduszyk commentedon Nov 15, 2024
Eleanor Boyd (@eleanorjboyd) Actually, I configure the
omitoption in[report]section, not[run]. In fact, Coverage.py accepts both cases:https://coverage.readthedocs.io/en/7.6.5/config.html#run-omit
https://coverage.readthedocs.io/en/7.6.5/config.html#report-omit
But, to be honest, the difference is not clear to me. I use the latter, as it sounds more logical to me to use report section to affect the behavior referred to coverage reports.
Besides, I prefer
pyproject.tomlas the configuration "hub". I don't think however this can be an issue here.9 remaining items
Respect [tool.coverage.report] omit in coverage view (#24466)
eleanorjboyd commentedon Dec 2, 2024
Verification Steps:
testsfolder, add a test in theretestsfolder in the UIroblourens commentedon Dec 6, 2024
I think I still see it, not sure if I did it right?
eleanorjboyd commentedon Dec 6, 2024
I found the error- this works for omit when it is a specific file
not for a pattern
add omit coverage support for path patterns (microsoft#24599)