mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-04 20:26:53 +00:00
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:
parent
153032f778
commit
77b2506071
4 changed files with 19 additions and 12 deletions
|
|
@ -24,10 +24,12 @@ def test_get_local_plugins_uses_cli_config():
|
|||
config_finder.cli_config.return_value = config_obj
|
||||
config_finder.ignore_config_files = False
|
||||
config_obj.get.return_value = ''
|
||||
config_file_value = 'foo.ini'
|
||||
config_finder.config_file = config_file_value
|
||||
|
||||
config.get_local_plugins(config_finder, cli_config='foo.ini')
|
||||
config.get_local_plugins(config_finder, cli_config=config_file_value)
|
||||
|
||||
config_finder.cli_config.assert_called_once_with('foo.ini')
|
||||
config_finder.cli_config.assert_called_once_with(config_file_value)
|
||||
|
||||
|
||||
def test_get_local_plugins():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue