Skip to content
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

Show expected and actual length for length error #59

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GIorfindel
Copy link

@GIorfindel GIorfindel commented Feb 26, 2017

This PR adds the actual and expected size for length errors. This is useful when an assert is performed on a large array or string without knowing the length of it.

@GIorfindel GIorfindel changed the title Show expected and actual length for legnth error Show expected and actual length for length error Mar 11, 2017
@GIorfindel
Copy link
Author

For example,
AssertionError: ["a","2","ZAR","ar","ar","zt","zt","zt","zt","zt","zt","et","tr","xdf","ar","ar","zre","zer","ERZ","45"] must have length of 3
becomes
AssertionError: ["a","2","ZAR","ar","ar","zt","zt","zt","zt","zt","zt","et","tr","xdf","ar","ar","zre","zer","ERZ","45"] must have length of 3. +expected, -actual : +3 -20
We don't need to count each item anymore to know the actual length of the array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant