def test_parsers_equiv(): assert list(str_parse('')) == list(list_parse([])) assert list(str_parse('ng | cat')) == list(list_parse(['ng | cat']))
def test_str_parse(expected): assert list(str_parse('cat | grep at')) == expected