From 2c37f402b2cbfb6488b5e28cef461a74e1d9c382 Mon Sep 17 00:00:00 2001 From: dalthviz Date: Sat, 18 Feb 2023 19:55:54 -0500 Subject: [PATCH] Testing --- spyder_env_manager/spyder/widgets/main_widget.py | 2 +- spyder_env_manager/tests/test_plugin.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spyder_env_manager/spyder/widgets/main_widget.py b/spyder_env_manager/spyder/widgets/main_widget.py index c5e6812..90deeb7 100644 --- a/spyder_env_manager/spyder/widgets/main_widget.py +++ b/spyder_env_manager/spyder/widgets/main_widget.py @@ -681,9 +681,9 @@ def _run_env_manager_action( *manager_action_args, **manager_action_kwargs, ) + self.manager_worker.moveToThread(self.env_manager_action_thread) self.manager_worker.sig_ready.connect(on_ready) self.manager_worker.sig_ready.connect(self.env_manager_action_thread.quit) - self.manager_worker.moveToThread(self.env_manager_action_thread) self.env_manager_action_thread.started.connect(self.manager_worker.start) self.start_spinner() self.env_manager_action_thread.start() diff --git a/spyder_env_manager/tests/test_plugin.py b/spyder_env_manager/tests/test_plugin.py index af3682a..373d658 100644 --- a/spyder_env_manager/tests/test_plugin.py +++ b/spyder_env_manager/tests/test_plugin.py @@ -223,11 +223,11 @@ def test_environment_package_installation(spyder_env_manager, qtbot, caplog): install_dialog.combobox = combobox_mock = Mock() combobox_mock.currentText = Mock(return_value="==") install_dialog.lineedit_version = lineedit_version_mock = Mock() - lineedit_version_mock.text = Mock(return_value="23.0") + lineedit_version_mock.text = Mock(return_value="22.0") assert install_dialog.lineedit_string.text() == "packaging" assert install_dialog.combobox.currentText() == "==" - assert install_dialog.lineedit_version.text() == "23.0" + assert install_dialog.lineedit_version.text() == "22.0" widget._run_action_for_env( dialog=install_dialog, action=SpyderEnvManagerWidgetActions.InstallPackage @@ -246,7 +246,7 @@ def test_environment_package_installation(spyder_env_manager, qtbot, caplog): qtbot.waitUntil( lambda: widget.packages_table.source_model.rowCount() == 3, - timeout=OPERATION_TIMEOUT, + timeout=LONG_OPERATION_TIMEOUT, ) assert widget.packages_table.get_package_info(2)["name"] == "packaging" - assert widget.packages_table.get_package_info(2)["version"] == "23.0" + assert widget.packages_table.get_package_info(2)["version"] == "22.0"