We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
pytest_assertrepr_compare
Approach:
__inequality_details__(op)
__inequality_details__
rough prototype for Contains:
Contains
def pytest_assertrepr_compare(config, op, left, right): if isinstance(right, Contains): word = 'not' if op == '==' else 'unexpectedly' if len(right.contained_values) == 1: descr = f'Container: {right.contained_values[0]!r} {word} found in' else: descr = f'Container: {right.contained_values!r} all {word} found in' return [ f'[dirty-equals] "{op}" failed', descr, *pformat(left).split('\n'), ]
The text was updated successfully, but these errors were encountered:
Any interest in me taking a crack at this?
Sorry, something went wrong.
I think best to leave it, I have some pretty strong ideas about how to go about it and it might require changes to other libraries to make it work.
while taking a look at some details, i took note that hamcrest implement a lot of the description stuff as well as a actual equals mapper
No branches or pull requests
Approach:
__inequality_details__(op)
should return a list of strings__inequality_details__
and call it if required,pytest_assertrepr_compare
rough prototype for
Contains
:The text was updated successfully, but these errors were encountered: