|
22 | 22 | ("E123,W234,,E206,,", ["E123", "W234", "E206"]), |
23 | 23 | ("E123, W234,, E206,,", ["E123", "W234", "E206"]), |
24 | 24 | ("E123,,W234,,E206,,", ["E123", "W234", "E206"]), |
25 | | - (["E123", "W234", "E206"], ["E123", "W234", "E206"]), |
26 | | - (["E123", "\n\tW234", "\n E206"], ["E123", "W234", "E206"]), |
27 | | - (["E123", "\n\tW234", "\n E206", "\n"], ["E123", "W234", "E206"]), |
28 | | - (["E123", "\n\tW234", "", "\n E206", "\n"], ["E123", "W234", "E206"]), |
29 | | - (["E123", "\n\tW234", "", "\n E206", ""], ["E123", "W234", "E206"]), |
| 25 | + ("", []), |
30 | 26 | ]) |
31 | 27 | def test_parse_comma_separated_list(value, expected): |
32 | 28 | """Verify that similar inputs produce identical outputs.""" |
@@ -132,14 +128,13 @@ def test_normalize_path(value, expected): |
132 | 128 |
|
133 | 129 |
|
134 | 130 | @pytest.mark.parametrize("value,expected", [ |
135 | | - ("flake8,pep8,pyflakes,mccabe", ["flake8", "pep8", "pyflakes", "mccabe"]), |
136 | | - ("flake8,\n\tpep8,\n pyflakes,\n\n mccabe", |
| 131 | + (["flake8", "pep8", "pyflakes", "mccabe"], |
137 | 132 | ["flake8", "pep8", "pyflakes", "mccabe"]), |
138 | | - ("../flake8,../pep8,../pyflakes,../mccabe", |
| 133 | + (["../flake8", "../pep8", "../pyflakes", "../mccabe"], |
139 | 134 | [os.path.abspath("../" + p) for p in RELATIVE_PATHS]), |
140 | 135 | ]) |
141 | 136 | def test_normalize_paths(value, expected): |
142 | | - """Verify we normalize comma-separated paths provided to the tool.""" |
| 137 | + """Verify we normalizes a sequence of paths provided to the tool.""" |
143 | 138 | assert utils.normalize_paths(value) == expected |
144 | 139 |
|
145 | 140 |
|
|
0 commit comments