-
Notifications
You must be signed in to change notification settings - Fork 215
Enable coveragerc #21
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
Conversation
b02431e
to
7a42117
Compare
7a42117
to
9fdffc7
Compare
9fdffc7
to
40d6290
Compare
Hey, thanks for your contributions. I'm planning a bigger rewrite right now (merging cov-core into the plugin, better re-use of coverage's features, ...). A lot of your issues should be solved by then, so please stay tight, I guess this takes a while. But I'm coming back to you :) |
This PR also contains tests that your rewrite should pass. |
Please to pull. I'm currently forced to use a fork with a git: url, and I'd much rather not. |
I'm not quite happy about introducing a new command line argument which is directly connected to a second one. I have thought about passing a special keyword to What do you think about implicitly enabling coverage if a coveragerc file is present and introducing something like |
I'm pretty sure you'll get bugs down that path, where people have coverage enabled where they didn't expect it. My proposal just makes the current approach more explicit. The current version enables pytest-cov whenever a source is configured. This makes the --source option do double duty: configuring coverage's --source and enabling the coverage system. This leaves no way to enable the system without over-ridding any source configured in coveragerc. After my change, --source still does the same double duty, just more explicitly, and there's a way to enable the system without over-ridding [run]source. The only way to make the change smaller would be to provide some magic value to --cov-source, maybe |
We can resolve these issues much more efficiently interactively. |
Just released cov-core 1.15.0. Please rebase and update this PR. |
(Yes, that means I favor this version ;) ) |
Feel free to join discussion, add ideas, etc. at #28 :) |
As third option (instead of this or #26) we could introduce a non-backward compatible parameter to 2.0. |
Here is my proposal (should go into 2.0):
|
That sounds like an enhancement to this patch, i.e. can be done in --phone is hard.
|
The essential idea is that there should be a way to enable pytest-cov without overriding the source setting in .coveragerc.
The new test requires the pull request to cov-core here: schlamar/cov-core#5
This is my second implementation. You can compare to the first here:
Find the diff here: bukzor@ebfcf41