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

Allow to change coverage data file location in settings #24741

Open
andreihes opened this issue Jan 24, 2025 · 2 comments
Open

Allow to change coverage data file location in settings #24741

andreihes opened this issue Jan 24, 2025 · 2 comments
Assignees
Labels
area-testing feature-request Request for new features or functionality needs community feedback Awaiting community feedback

Comments

@andreihes
Copy link

I have a need to override a coverage data file location in python project. So I use:

[run]
data_file = .data/coverage.data

or similar in .coveragerc. Once changed then VS Code is not able to render TEST COVERAGE anywhere on the UI.

It would be nice to see some setting like:

"python.testing.coverageFile": "${workspaceFolder}/.data/coverage.data"

to set it on demand instead of default .coverage one.

@rzhao271 rzhao271 assigned eleanorjboyd and unassigned rzhao271 Jan 24, 2025
@eleanorjboyd eleanorjboyd transferred this issue from microsoft/vscode Jan 24, 2025
@eleanorjboyd eleanorjboyd added feature-request Request for new features or functionality area-testing needs community feedback Awaiting community feedback labels Jan 24, 2025
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

Yes valid request. From what I can see this would just require allow coverage.Coverage() to have a data_file (FilePath | DefaultValue | None) value here:

cov = coverage.Coverage()
cov.load()
. With the setting passing an env var that could be read and substituted if it exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-testing feature-request Request for new features or functionality needs community feedback Awaiting community feedback
Projects
None yet
Development

No branches or pull requests

3 participants