Replies: 1 comment 9 replies
-
I am confused by your use case, it seems overly complex. Would you not consider implementing dunder eq (and Dunder hash) etc in your object explicitly and then use simple asserting to check the fact, passing the logic to the hook seems weird to me, not to mention non reusable |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everybody.
I have two python builtin object instance without
__eq__
method and I want to write a custom assert equal for this case. In the documentation, I found pytest_assertrepr_compare hook which does what I want but they call only when test return False. Does pytest have a hook which called instead of build-in__eq__
method? For example something likefoo.py
conftest.py
test.py
Beta Was this translation helpful? Give feedback.
All reactions