mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-10 14:54:17 +00:00
Add more parameters to file location generation test
This commit is contained in:
parent
cb276d63e3
commit
204a367095
1 changed files with 15 additions and 2 deletions
|
|
@ -36,17 +36,30 @@ def test_cli_config():
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize('args,expected', [
|
@pytest.mark.parametrize('args,expected', [
|
||||||
([], # No arguments
|
# No arguments, common prefix of abspath('.')
|
||||||
|
([],
|
||||||
[os.path.abspath('setup.cfg'),
|
[os.path.abspath('setup.cfg'),
|
||||||
os.path.abspath('tox.ini'),
|
os.path.abspath('tox.ini'),
|
||||||
os.path.abspath('.flake8')]),
|
os.path.abspath('.flake8')]),
|
||||||
(['flake8/options', 'flake8/'], # Common prefix of "flake8/"
|
# Common prefix of "flake8/"
|
||||||
|
(['flake8/options', 'flake8/'],
|
||||||
[os.path.abspath('flake8/setup.cfg'),
|
[os.path.abspath('flake8/setup.cfg'),
|
||||||
os.path.abspath('flake8/tox.ini'),
|
os.path.abspath('flake8/tox.ini'),
|
||||||
os.path.abspath('flake8/.flake8'),
|
os.path.abspath('flake8/.flake8'),
|
||||||
os.path.abspath('setup.cfg'),
|
os.path.abspath('setup.cfg'),
|
||||||
os.path.abspath('tox.ini'),
|
os.path.abspath('tox.ini'),
|
||||||
os.path.abspath('.flake8')]),
|
os.path.abspath('.flake8')]),
|
||||||
|
# Common prefix of "flake8/options"
|
||||||
|
(['flake8/options', 'flake8/options/sub'],
|
||||||
|
[os.path.abspath('flake8/options/setup.cfg'),
|
||||||
|
os.path.abspath('flake8/options/tox.ini'),
|
||||||
|
os.path.abspath('flake8/options/.flake8'),
|
||||||
|
os.path.abspath('flake8/setup.cfg'),
|
||||||
|
os.path.abspath('flake8/tox.ini'),
|
||||||
|
os.path.abspath('flake8/.flake8'),
|
||||||
|
os.path.abspath('setup.cfg'),
|
||||||
|
os.path.abspath('tox.ini'),
|
||||||
|
os.path.abspath('.flake8')]),
|
||||||
])
|
])
|
||||||
def test_generate_possible_local_config_files(args, expected):
|
def test_generate_possible_local_config_files(args, expected):
|
||||||
"""Verify generation of all possible config paths."""
|
"""Verify generation of all possible config paths."""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue