Skip to content

Commit

Permalink
Testing
Browse files Browse the repository at this point in the history
  • Loading branch information
dalthviz committed Feb 20, 2023
1 parent 090b327 commit 2c37f40
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion spyder_env_manager/spyder/widgets/main_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
8 changes: 4 additions & 4 deletions spyder_env_manager/tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"

0 comments on commit 2c37f40

Please sign in to comment.