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

Feature: add diff_cover? #600

Open
tlambert03 opened this issue Jun 26, 2023 · 2 comments
Open

Feature: add diff_cover? #600

tlambert03 opened this issue Jun 26, 2023 · 2 comments

Comments

@tlambert03
Copy link

I'm wondering if you've considered (or would consider a PR) implementing support for diff_cover?

I'm thinking something like pytest --cov --cov-report=term-diff, which would essentially run diff_cover and add it to the report? I took a stab at implementing this as an independent pytest plugin (that would in turn use pytest-cov), but found that it was rather difficult (and probably bad form) to essentially modify the pytest-cov plugin instance to achieve this.

I'm happy to open PR trying to implement this, but wanted to gauge interest first. thanks!

@nedbat
Copy link
Collaborator

nedbat commented Jun 26, 2023

Instead of further complicating pytest-cov, why not run diff-cover as a command of its own?

@tlambert03
Copy link
Author

tlambert03 commented Jun 26, 2023

yep, a two step process is definitely an alternative :) ... but you could make a similar argument for reports in general right? Why not just run coverage report after running pytest --cov to generate the xml?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants