diff --git a/spyder/plugins/maininterpreter/tests/test_confpage.py b/spyder/plugins/maininterpreter/tests/test_confpage.py index 392b54bbdf7..f2fd4a885ed 100644 --- a/spyder/plugins/maininterpreter/tests/test_confpage.py +++ b/spyder/plugins/maininterpreter/tests/test_confpage.py @@ -12,8 +12,6 @@ # Local imports from spyder.api.plugins import Plugins from spyder.api.plugin_registration.registry import PLUGIN_REGISTRY -from spyder.config.manager import CONF -from spyder.plugins.preferences.api import PreferencePages from spyder.plugins.maininterpreter.plugin import MainInterpreter from spyder.plugins.preferences.tests.conftest import MainWindowMock from spyder.utils.conda import get_list_conda_envs @@ -22,7 +20,7 @@ # Get envs to show them in the Main interpreter page. This is actually # done in a thread in the InterpreterStatus widget. -# We also recording the time needed to get them to compare it with the +# We're also recording the time needed to get them to compare it with the # loading time of that config page. t0 = time.time() get_list_conda_envs() @@ -31,14 +29,11 @@ def test_load_time(qtbot): - from spyder.plugins.maininterpreter.confpage import ( - MainInterpreterConfigPage) - # Create Preferences dialog main = MainWindowMock() preferences = main.get_plugin(Plugins.Preferences) - main_interpreter = PLUGIN_REGISTRY.register_plugin(main, MainInterpreter) + PLUGIN_REGISTRY.register_plugin(main, MainInterpreter) # Create page and measure time to do it t0 = time.time() diff --git a/spyder/plugins/preferences/plugin.py b/spyder/plugins/preferences/plugin.py index eb914c54814..43821ab0df1 100644 --- a/spyder/plugins/preferences/plugin.py +++ b/spyder/plugins/preferences/plugin.py @@ -310,7 +310,6 @@ def on_application_available(self): @on_plugin_teardown(plugin=Plugins.MainMenu) def on_main_menu_teardown(self): - container = self.get_container() main_menu = self.get_plugin(Plugins.MainMenu) main_menu.remove_item_from_application_menu( @@ -325,7 +324,6 @@ def on_main_menu_teardown(self): @on_plugin_teardown(plugin=Plugins.Toolbar) def on_toolbar_teardown(self): - container = self.get_container() toolbar = self.get_plugin(Plugins.Toolbar) toolbar.remove_item_from_application_toolbar( PreferencesActions.Show, diff --git a/spyder/plugins/preferences/tests/conftest.py b/spyder/plugins/preferences/tests/conftest.py index 1e93f48d5be..496b3bbad80 100644 --- a/spyder/plugins/preferences/tests/conftest.py +++ b/spyder/plugins/preferences/tests/conftest.py @@ -10,7 +10,6 @@ """ import types - from unittest.mock import Mock, MagicMock # Third party imports