Skip to content

Instantly share code, notes, and snippets.

@nicoddemus nicoddemus/foo.rst Secret
Last active Oct 8, 2019

Embed
What would you like to do?

Improve verbose diff output with sequences.

Before:

E   AssertionError: assert ['version', '...version_info'] == ['version', '...version', ...]
E     Right contains 3 more items, first extra item: ' '
E     Full diff:
E     - ['version', 'version_info', 'sys.version', 'sys.version_info']
E     + ['version',
E     +  'version_info',
E     +  'sys.version',
E     +  'sys.version_info',
E     +  ' ',
E     +  'sys.version',
E     +  'sys.version_info']

After:

E   AssertionError: assert ['version', '...version_info'] == ['version', '...version', ...]
E     Right contains 3 more items, first extra item: ' '
E     Full diff:
E       [
E        'version',
E        'version_info',
E        'sys.version',
E        'sys.version_info',
E     +  ' ',
E     +  'sys.version',
E     +  'sys.version_info',
E       ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.