-
Notifications
You must be signed in to change notification settings - Fork 4.2k
TE-2731 Upgrade to pytest-cov 2.6.0 #19546
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
516ebfd to
fdfbb65
Compare
|
jenkins run pipeline python |
|
jenkins run python |
|
This doesn't seem to have fixed the problem with collecting coverage data from remote xdist workers, but does at least get us to the current release of pytest-cov so we can debug against the latest code. |
|
What's going on now with the remote coverage files? |
|
So the outstanding problem with the pipeline job for unit tests is that when using pytest-xdist with remote workers, pytest-cov is only reporting code coverage from test discovery on the main process; it's somehow failing to collect coverage data from the actual test execution on the remote workers. It works fine with multiple worker processes on the same machine, so it may be some sort of invalid assumption about working on a shared filesystem. I'm still digging through a few pytest-cov issues reported around this, as some people have gotten it working via fiddling with configuration options but aren't sure exactly how they did it. This PR does at least fix coverage in our current build flow job with pytest 2.6.0. I also noticed just a little bit ago that 2.6.1 has been released, so I'll update the PR to use that and the also-just-released pytest 4.1.0. |
44d1695 to
0bb1aef
Compare
0bb1aef to
d0d6d57
Compare
|
Your PR has finished running tests. There were no failures. |
|
EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production on Wednesday, January 09, 2019. |
|
EdX Release Notice: This PR has been deployed to the production environment. |
pytest-cov 2.5.1 isn't gathering coverage data correctly from remote pytest-xdist workers. Some fixes were made around this in 2.6.0, so try upgrading. This required making some tweaks to accommodate changes made in the new version:
.coveragefiles generated when pytest-cov auto-combines the coverage data from each worker, so they don't overwrite each other when collected to combine after all pytest runs finishAlso pinned
pillowsince the new version is causing one test to fail for a reason I haven't had time to diagnose yet.