-
Notifications
You must be signed in to change notification settings - Fork 213
Module-level code imported from conftest files is reported as 'uncovered' #19
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
Comments
Already implemented and released: #4 |
If you are already using using the new version, please give me more details, so we can work this out :) A failing test case would be the best. |
Well, that's embarrassing. The new version does fix this. I didn't try upgrading because I looked at the latest code on GitHub, and although I saw the In any case, thanks for having already fixed this, and sorry for the noise :-) Feel free to close. |
Only slave coverage is started in |
BTW, I know the code is badly structured, that's for legacy reasons. I'm the maintainer for just a few months now. I'm planning a bigger rewrite but that's still in my head right now... |
I see it now. Still don't know I missed the calls to Thanks for picking up maintenance of pytest-cov! |
This is because
pytest-cov
doesn't actually start coverage measurement untilpytest_sessionstart
.I think it could perhaps be fixed by starting coverage measurement instead in
pytest_load_initial_conftests
, but a few things about this make me nervous:If people are setting up their coverage options via some method other than command-line args (e.g. modifying the config in another hook or plugin) it would no longer take effect soon enough.
I'm not familiar with the distributed-coverage aspect of
pytest-cov
andcov-core
, so I'm not sure what implications there might be there.The text was updated successfully, but these errors were encountered: