mirror of
https://github.com/PyCQA/flake8.git
synced 2026-03-31 11:16:54 +00:00
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.
14 lines
482 B
Python
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
|