utils: Change parse_comma_separated_list() contract

This is the initial incision point to only accept `str` (or `None`) for
parsing out comma/whitespace/regexp separated values.
This commit is contained in:
Eric N. Vander Weele 2019-07-28 10:39:27 -04:00
parent 9fbaf2d2ea
commit 9283f2f03f
3 changed files with 6 additions and 18 deletions

View file

@ -22,11 +22,6 @@ RELATIVE_PATHS = ["flake8", "pep8", "pyflakes", "mccabe"]
("E123,W234,,E206,,", ["E123", "W234", "E206"]),
("E123, W234,, E206,,", ["E123", "W234", "E206"]),
("E123,,W234,,E206,,", ["E123", "W234", "E206"]),
(["E123", "W234", "E206"], ["E123", "W234", "E206"]),
(["E123", "\n\tW234", "\n E206"], ["E123", "W234", "E206"]),
(["E123", "\n\tW234", "\n E206", "\n"], ["E123", "W234", "E206"]),
(["E123", "\n\tW234", "", "\n E206", "\n"], ["E123", "W234", "E206"]),
(["E123", "\n\tW234", "", "\n E206", ""], ["E123", "W234", "E206"]),
])
def test_parse_comma_separated_list(value, expected):
"""Verify that similar inputs produce identical outputs."""