flake8/tests/unit/test_utils.py
Ian Cordasco a4042d6d69 Start fleshing out flake8.utils
Add parse_comma_separated_list, normalize_path, and normalize_paths and
add logic in OptionManager.parse_args to use the right normalize_path*
function based on comma_separated_list value of the option.
2016-01-09 15:58:26 -06:00

14 lines
482 B
Python

"""Tests for flake8's utils module."""
import pytest
from flake8 import utils
@pytest.mark.parametrize("value,expected", [
("E123,\n\tW234,\n E206", ["E123", "W234", "E206"]),
("E123,W234,E206", ["E123", "W234", "E206"]),
(["E123", "W234", "E206"], ["E123", "W234", "E206"]),
(["E123", "\n\tW234", "\n E206"], ["E123", "W234", "E206"]),
])
def test_parse_comma_separated_list(value, expected):
assert utils.parse_comma_separated_list(value) == expected