config: Switch code paths to use 'ConfigFileFinder.config_file'

Now that the `ConfigFileFinder` has the `.config_file` attribute, switch
the relevant code paths to utilize this public attribute.

Tests have been updated to either construct `ConfigFileFinder` or mock
the object appropriately.
This commit is contained in:
Eric N. Vander Weele 2020-01-12 15:13:41 -08:00
parent 153032f778
commit 77b2506071
4 changed files with 19 additions and 12 deletions

View file

@ -30,7 +30,10 @@ def test_aggregate_options_with_config(optmanager):
"""Verify we aggregate options and config values appropriately."""
arguments = ['flake8', '--select',
'E11,E34,E402,W,F', '--exclude', 'tests/*']
config_finder = config.ConfigFileFinder('flake8', [])
config_finder = config.ConfigFileFinder(
'flake8',
[],
config_file=CLI_SPECIFIED_CONFIG)
options, args = aggregator.aggregate_options(
optmanager, config_finder, CLI_SPECIFIED_CONFIG, arguments)