-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
Mock 100% coverage #13045
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
Mock 100% coverage #13045
Conversation
Otherwise coverage measurement over this package gets seriously out of whack.
If this functionality is ever needed, the tests can be added then.
This is mainly moving pass statements onto the same line as their def statement, but this pattern is easy to match in an "ignore" rule should anyone ever brave branch coverage ;-)
This will need to be brought back or skipped on the backport though ;-)
See _mock_call, line 967.
@mariocj89 / @tirkarthi - I'm unsure about whether this should be backported to the 3.7 branch:
Thoughts? |
FWIW, I believe a BPO issue should have been created for this sizeable patch (as prescribed by the developer's guide). |
My apologies, would you like me to retrospectively open one? |
Please don't backport this to 3.7 . I feel this could have waited a bit since some of the internals of mock don't have tests and one refactoring that seemed harmless had produced regression (https://bugs.python.org/issue36593). I agree with Zackery that this could have had a bpo and possibly a review from @voidspace but it's little late since this is merged. But then we have beta period for bug fixing if any and can revert chunks of it if needed :) |
Well, actually, as of this PR, the internals of mock do have tests. Everything is covered, some of it was challenging ;-) My intention was to get his into the backport so we could get some real world experience of it. This is super weird, the first call to @voidspace / @mfoord is at PyCon and said he'd have time to sprint on Mock, so hopefully he can give this a good going over. I've got the backporting process to the standalone mock package working again, so whatever we find we can get quickly released onto pypi for more testing. |
Are you seeing this after the PR or before the PR itself? Please add the code and error. I could give it a try. |
Code is here: Failure is here: This is only on pypy... |
Oh. and here's the "fix": testing-cabal/mock@252c749 Now, why would pypy need that for magic mocks to work?! |
Get Mock to 100% coverage and clean up a few things along the way.