MCPcopy Create free account
hub / github.com/PyCQA/flake8 / test_parse_args_normalize_paths

Function test_parse_args_normalize_paths

tests/unit/test_option_manager.py:145–161  ·  view source on GitHub ↗

Verify parse_args normalizes a comma-separated list of paths.

(optmanager)

Source from the content-addressed store, hash-verified

143
144
145def test_parse_args_normalize_paths(optmanager):
146 """Verify parse_args normalizes a comma-separated list of paths."""
147 assert optmanager.options == []
148 assert optmanager.config_options_dict == {}
149
150 optmanager.add_option(
151 "--extra-config", normalize_paths=True, comma_separated_list=True,
152 )
153
154 options = optmanager.parse_args(
155 ["--extra-config", "../config.ini,tox.ini,flake8/some-other.cfg"],
156 )
157 assert options.extra_config == [
158 os.path.abspath("../config.ini"),
159 "tox.ini",
160 os.path.abspath("flake8/some-other.cfg"),
161 ]
162
163
164def test_extend_default_ignore(optmanager):

Callers

nothing calls this directly

Calls 2

add_optionMethod · 0.80
parse_argsMethod · 0.80

Tested by

no test coverage detected