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

assertion diffs: slightly confusing full diff for range #6772

Open
blueyed opened this issue Feb 19, 2020 · 0 comments
Open

assertion diffs: slightly confusing full diff for range #6772

blueyed opened this issue Feb 19, 2020 · 0 comments
Labels
topic: rewrite related to the assertion rewrite mechanism type: enhancement new feature or API change, should be merged into features branch

Comments

@blueyed
Copy link
Contributor

blueyed commented Feb 19, 2020

>       assert range(5) == range(7)
E       assert range(0, 5) == range(0, 7)
E         Right contains 2 more items, first extra item: 5
E         Full diff:
E         - range(0, 7)
E         ?          ^
E         + range(0, 5)
E         ?          ^

This is what pprint.pformat returns.
It could handle range classes in a special way and call list on them maybe before.

@blueyed blueyed added type: enhancement new feature or API change, should be merged into features branch topic: rewrite related to the assertion rewrite mechanism labels Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: rewrite related to the assertion rewrite mechanism type: enhancement new feature or API change, should be merged into features branch
Projects
None yet
Development

No branches or pull requests

1 participant