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

Full diff of sequences should be displayed on assertion failures when verbose #715

Closed
pytestbot opened this issue Apr 9, 2015 · 1 comment
Labels
topic: reporting related to terminal output and user-facing messages and errors type: bug problem that needs to be addressed

Comments

@pytestbot
Copy link
Contributor

Originally reported by: BitBucket: pombredanne, GitHub: pombredanne


Today when tow sequences are compared, only the first different element is display with an ellipsis for the rest and there is no way to display a full sequence diff.

This means that other logging/print mechanisms must be used to display these on failure.
The proposed fix (pull request coming) is to enable a full sequence diff.

Note that while _pytest.assertion.util._compare_eq_sequence does not allow for these full diffs, _pytest.assertion.util._compare_eq_iterable does. And that _pytest.assertion.util._compare_eq_sequence has some commented out difflib calling code meaning that someone though about this at some point of time in the past...


@pytestbot
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: reporting related to terminal output and user-facing messages and errors type: bug problem that needs to be addressed
Projects
None yet
Development

No branches or pull requests

1 participant