Skip to content

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