-
-
Notifications
You must be signed in to change notification settings - Fork 731
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
Drop pytest-cov and uses vanilla coverage #809
Conversation
I wonder if it solves the problem with tests debugging under PyCharm. If so it's might be reasonable to copy it to Approved 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also prefer vanilla coverage over pytest-cov, but don't really have a strong argument for why.
I guess my two main reasons for preferring it are:
- pytest-cov implicitly adds a few config options to coverage that are sometimes surprising, like with the multiprocess thing you pointed out
- I'd rather learn to use Coverage, a generic (and very well-maintained) tool that is not pytest-specific, than pytest-cov. Using vanilla Coverage with pytest is not generally difficult/complicated.
But I don't think these are super strong reasons so it's perhaps a discussion for the larger encode org to have.
@JayH5 the reason might be the problem with debugging in IDE I mentioned. For example I'm executing each test with I meant that I want to be able to run tests under debugging without cov enabled |
I think we're using this alternative "no Pytest-cov" approach in the HTTPCore repo...? There's a separate |
yep I have a pytest template with |
nope you are using pytest-cov and coverage report, the latter being obviously useless since pytest-cov take care of it |
|
care to expand on this @graingert ?
I fail to see however how that translates into testing sources files vs installed package, I see no installation process here. |
@euri10 ah it seems you're not installing uvicorn as part of the tests. That's usually desirable because the source files and the distributed package often have subtle differences |
yes indeed, we may want to change that. the biggest grip I had on pytest-cov was that I had to put a |
Prompted by #805
I personally dont see the advantage of using pytest-cov, this PR drops it and uses vanilla coverage.
It solves the creation of those coverage.hostname.xxxx left by pytest-cov that the aforementioned PR wanted to ignore.
Any preferences ?