Skip to content

Improve diffing algorithm for trivial cases #8779

@stdedos

Description

@stdedos

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: rewriterelated to the assertion rewrite mechanismtype: proposalproposal for a new feature, often to gather opinions or design the API around the new feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions