mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-09 14:24:17 +00:00
application: Change make_config_finder to be a pure static method
This change makes `Application.make_config_finder` to be side-effect free where it its return value is only determined by its input values.
This commit is contained in:
parent
19868e5c21
commit
d75088b199
3 changed files with 18 additions and 8 deletions
|
|
@ -19,13 +19,14 @@ def test_get_style_guide():
|
|||
)
|
||||
mockedapp = mock.Mock()
|
||||
mockedapp.parse_preliminary_options.return_value = (prelim_opts, [])
|
||||
mockedapp.program = 'flake8'
|
||||
with mock.patch('flake8.main.application.Application') as application:
|
||||
application.return_value = mockedapp
|
||||
style_guide = api.get_style_guide()
|
||||
|
||||
application.assert_called_once_with()
|
||||
mockedapp.parse_preliminary_options.assert_called_once_with([])
|
||||
mockedapp.make_config_finder.assert_called_once_with([])
|
||||
mockedapp.make_config_finder.assert_called_once_with(mockedapp.program, [])
|
||||
mockedapp.find_plugins.assert_called_once_with(None, False)
|
||||
mockedapp.register_plugin_options.assert_called_once_with()
|
||||
mockedapp.parse_configuration_and_cli.assert_called_once_with([])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue