PyTest compare short lists
examples/pytest/test_short_lists.py
import string import re def get_lista(): return 'a', 'b', 'c' def get_listx(): return 'x', 'b', 'y' def test_short_lists(): assert get_lista() == get_listx()
$ pytest test_short_lists.py
def test_short_lists(): > assert get_lista() == get_listx() E AssertionError: assert ('a', 'b', 'c') == ('x', 'b', 'y') E At index 0 diff: 'a' != 'x' E Use -v to get the full diff