-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Option to show full assertion diff #381
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
Labels
type: enhancement
new feature or API change, should be merged into features branch
Comments
Original comment by Floris Bruynooghe (BitBucket: flub, GitHub: flub): Hi, I believe this is already fixed. Currently you get this:
And with -v:
Certainly this second option shows you all items in the dictionary, although I'll admit not as a straight diff. Feel free to re-open if you disagree or I misunderstood this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Originally reported by: Wolfgang Schnerring (BitBucket: wosc, GitHub: wosc)
If you compare e.g. a larger dict and the assertion fails, the output is truncated with ellipses in it -- which sometimes hide exactly the parts that differ ("{'foo': 'bar', ... } != {'foo': 'bar', ...}"). Even passing -v doesn't help.
I've looked at _pytest.util._compare_eq_dict, it uses py.io.saferepr, which in turn has a maxlength parameter, but pytest does not use that -- I guess it should.
The text was updated successfully, but these errors were encountered: