[Pytest-commit] Issue #715: Full diff of sequences should be displayed on assertion failures when verbose (pytest-dev/pytest)

pombredanne issues-reply at bitbucket.org
Thu Apr 9 10:42:43 CEST 2015


New issue 715: Full diff of sequences should be displayed on assertion failures when verbose
https://bitbucket.org/pytest-dev/pytest/issue/715/full-diff-of-sequences-should-be-displayed

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...






More information about the pytest-commit mailing list