Add more parameters to file location generation test

This commit is contained in:
Ian Cordasco 2016-01-10 09:05:09 -06:00
parent cb276d63e3
commit 204a367095

View file

@ -36,17 +36,30 @@ def test_cli_config():
@pytest.mark.parametrize('args,expected', [
([], # No arguments
# No arguments, common prefix of abspath('.')
([],
[os.path.abspath('setup.cfg'),
os.path.abspath('tox.ini'),
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/tox.ini'),
os.path.abspath('flake8/.flake8'),
os.path.abspath('setup.cfg'),
os.path.abspath('tox.ini'),
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):
"""Verify generation of all possible config paths."""