diff options
| author | Eric N. Vander Weele <ericvw@gmail.com> | 2020-01-07 13:14:34 -0500 |
|---|---|---|
| committer | Eric N. Vander Weele <ericvw@gmail.com> | 2020-01-07 13:14:34 -0500 |
| commit | c918e7249699ab91ccbd6d69a898d19aa009c971 (patch) | |
| tree | 258f2692d8a214e48e792cdd72162d464916edc7 /tests | |
| parent | 3d546d448a22b131f42444657f0985b37b252097 (diff) | |
| download | flake8-c918e7249699ab91ccbd6d69a898d19aa009c971.tar.gz | |
Remove unused 'isolated' parameter
Now that `ConfigFileFinder.ignore_config_files` attribute is used
everywhere and is constructed from the `--isolated` CLI option, the now
unused `isolated` parameters can be safely removed.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/integration/test_aggregator.py | 4 | ||||
| -rw-r--r-- | tests/unit/test_get_local_plugins.py | 3 | ||||
| -rw-r--r-- | tests/unit/test_legacy_api.py | 4 | ||||
| -rw-r--r-- | tests/unit/test_merged_config_parser.py | 3 |
4 files changed, 8 insertions, 6 deletions
diff --git a/tests/integration/test_aggregator.py b/tests/integration/test_aggregator.py index 636b3d5..672c865 100644 --- a/tests/integration/test_aggregator.py +++ b/tests/integration/test_aggregator.py @@ -32,7 +32,7 @@ def test_aggregate_options_with_config(optmanager): 'E11,E34,E402,W,F', '--exclude', 'tests/*'] config_finder = config.ConfigFileFinder('flake8', []) options, args = aggregator.aggregate_options( - optmanager, config_finder, CLI_SPECIFIED_CONFIG, False, arguments) + optmanager, config_finder, CLI_SPECIFIED_CONFIG, arguments) assert options.select == ['E11', 'E34', 'E402', 'W', 'F'] assert options.ignore == ['E123', 'W234', 'E111'] @@ -47,7 +47,7 @@ def test_aggregate_options_when_isolated(optmanager): 'flake8', [], ignore_config_files=True) optmanager.extend_default_ignore(['E8']) options, args = aggregator.aggregate_options( - optmanager, config_finder, None, True, arguments) + optmanager, config_finder, None, arguments) assert options.select == ['E11', 'E34', 'E402', 'W', 'F'] assert sorted(options.ignore) == [ diff --git a/tests/unit/test_get_local_plugins.py b/tests/unit/test_get_local_plugins.py index db62e33..6311677 100644 --- a/tests/unit/test_get_local_plugins.py +++ b/tests/unit/test_get_local_plugins.py @@ -7,8 +7,9 @@ from flake8.options import config def test_get_local_plugins_respects_isolated(): """Verify behaviour of get_local_plugins with isolated=True.""" config_finder = mock.MagicMock() + config_finder.ignore_config_files = True - local_plugins = config.get_local_plugins(config_finder, isolated=True) + local_plugins = config.get_local_plugins(config_finder) assert local_plugins.extension == [] assert local_plugins.report == [] diff --git a/tests/unit/test_legacy_api.py b/tests/unit/test_legacy_api.py index d3b9eb5..2ec836c 100644 --- a/tests/unit/test_legacy_api.py +++ b/tests/unit/test_legacy_api.py @@ -31,10 +31,10 @@ def test_get_style_guide(): application.assert_called_once_with() mockedapp.parse_preliminary_options.assert_called_once_with([]) - mockedapp.find_plugins.assert_called_once_with(config_finder, None, False) + mockedapp.find_plugins.assert_called_once_with(config_finder, None) mockedapp.register_plugin_options.assert_called_once_with() mockedapp.parse_configuration_and_cli.assert_called_once_with( - config_finder, None, False, []) + config_finder, None, []) mockedapp.make_formatter.assert_called_once_with() mockedapp.make_guide.assert_called_once_with() mockedapp.make_file_checker_manager.assert_called_once_with() diff --git a/tests/unit/test_merged_config_parser.py b/tests/unit/test_merged_config_parser.py index 186d853..f2d70d9 100644 --- a/tests/unit/test_merged_config_parser.py +++ b/tests/unit/test_merged_config_parser.py @@ -145,9 +145,10 @@ def test_merge_user_and_local_config(optmanager, config_finder): def test_parse_isolates_config(optmanager): """Verify behaviour of the parse method with isolated=True.""" config_finder = mock.MagicMock() + config_finder.ignore_config_files = True parser = config.MergedConfigParser(optmanager, config_finder) - assert parser.parse(isolated=True) == {} + assert parser.parse() == {} assert config_finder.local_configs.called is False assert config_finder.user_config.called is False |
