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

"Run Test with Coverage" should allow omitting files from the report #24309

Closed
bersbersbers opened this issue Oct 15, 2024 · 3 comments
Closed
Assignees
Labels
feature-request Request for new features or functionality triage-needed Needs assignment to the proper sub-team

Comments

@bersbersbers
Copy link

"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.

Compare also #24308.

@bersbersbers bersbersbers added the feature-request Request for new features or functionality label Oct 15, 2024
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Oct 15, 2024
@bersbersbers
Copy link
Author

bersbersbers commented Oct 15, 2024

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",
]

@eleanorjboyd
Copy link
Member

seems related to this: #24366. Closing this one to group all the issues related to omitting from coverage in one issue.

@eleanorjboyd eleanorjboyd closed this as not planned Won't fix, can't repro, duplicate, stale Oct 30, 2024
@bersbersbers
Copy link
Author

Just for the record: this is a different issue than #24308 IMHO, related to the fact that omission of files can happen in at least two different places.

In this issue, I don't really care which mechanism is used, as long as the files do not appear in the final report in the UI. In fact, the workaround mentioned in #24309 (comment) works fine for me. So I am fine with closing this issue.

Just for completeness, in #24308, I care about error handling during the reporting phase, in case a file that exiting during run is missing during report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

2 participants