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
Don't use describe_to of mock objects #70
Conversation
Running in to some odd issues on travis
|
Will this also work for |
Looking at the code, I don't think it will. I think _Call should be added to MOCKTYPES, and maybe _Sentinel as well. Unfortunately I failed to setup a pyhamcrest project in the short time I had, so I cannot contribute more for now. |
The build is working on Travis again now, so can you rebase this and try again @keis? |
7a8b16a
to
4096982
Compare
Completely forgot I had this PR open 😅 rebased! |
Thanks. Looks good to me, @offbyone. The Call thing may be worth considering as a follow up, but this PR looks fine as it is. |
Speaking of |
Hah - I've been working with something similar: https://github.com/brunns/brunns-matchers/blob/master/tests/unit/matchers/test_mock.py#L66 |
When using hamcrest together with mocks and asserting that the same mock objects are being passed around the assertion messages produce are bad because hamcrest ends up calling
describe_to
of the mocks which does nothing.before
after