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
Fix coverage on remote xdist nodes #19630
Conversation
jenkins run pipeline python |
1 similar comment
jenkins run pipeline python |
6531272
to
1055794
Compare
jenkins run pipeline python |
1055794
to
f7799ba
Compare
jenkins run pipeline python |
Your PR has finished running tests. There were no failures. |
@@ -476,12 +476,12 @@ def test_get_user_group_id_for_partition(self): | |||
|
|||
# get a group assigned to the user | |||
group1_id = self.partition_service.get_user_group_id_for_partition(self.user, user_partition_id) | |||
self.assertEqual(group1_id, groups[0].id) | |||
assert group1_id == groups[0].id |
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.
^ should we feel empowered to use pytest asserts instead of unittest asserts from here on out? I understand why you did it, I am just curious about it as a policy (following up after our conversation w/ dave o, in which consistency was brought up)
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.
Yes, I think our current stance is "don't waste time trying to convert all the assertions, but feel free to use pytest assertions in new code or where the old assertions aren't providing enough useful information to diagnose known problems".
EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production on Thursday, January 24, 2019. |
EdX Release Notice: This PR has been deployed to the production environment. |
@nedbat This will need to be cherry-picked into Ironwood in order for coverage to work in its Jenkins tests |
I've cherry-picked this onto ironwood.master |
Fixed coverage reporting with remote xdist workers by using the correct
[paths]
configuration in.coveragerc
; pytest-cov tries to set it automatically, but has a bug in doing so that I just reported. Also fixed a few other things I noticed while debugging:reports
directory on xdist workers; the paver commands already do this, but direct pytest runs from devstack benefit from having this here.