pytest
pytest copied to clipboard
Improve diffing algorithm for trivial cases
Hello there! Would improving the diff algorithm be considered / easy-to-do in this case?
E AssertionError: assert ['scaling', '...en', 'scroll'] == ['score', 'screen', 'scroll']
E At index 0 diff: 'scaling' != 'score'
E Left contains one more item: 'scroll'
E Use -v to get the full diff
>>>
E AssertionError: assert ['scaling', '...en', 'scroll'] == ['score', 'screen', 'scroll']
E At index 0 diff: 'scaling' != 'score'
E Left contains one more item: 'scroll'
E Full diff:
E - ['score', 'screen', 'scroll']
E + ['scaling', 'score', 'screen', 'scroll']
E ? +++++++++++
There's "just one more element"; not index 0 != and one more item (which is actually not the extra one).