Skip to content

Commit

Permalink
Call close_all_sessions()
Browse files Browse the repository at this point in the history
  • Loading branch information
soininen committed Sep 11, 2023
1 parent f932c3d commit 5db1b47
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions tests/test_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,13 @@ def tearDown(self):
with patch("spinetoolbox.spine_db_editor.widgets.spine_db_editor.QMessageBox") as message_box:
message_box.exec.return_value = QMessageBox.StandardButton.Ok
self._db_editor.rollback_session()
#with patch("spinetoolbox.spine_db_editor.widgets.spine_db_editor.SpineDBEditor.save_window_state"), patch(
# "spinetoolbox.spine_db_manager.QMessageBox"
#):
# self._db_editor.close()
#while not self._db_map.closed:
# QApplication.processEvents()
with patch("spinetoolbox.spine_db_editor.widgets.spine_db_editor.SpineDBEditor.save_window_state"), patch(
"spinetoolbox.spine_db_manager.QMessageBox"
):
self._db_editor.close()
self._db_mngr.close_all_sessions()
while not self._db_map.closed:
QApplication.processEvents()
self._db_mngr.clean_up()
self._db_editor.deleteLater()
self._db_editor = None
Expand Down

0 comments on commit 5db1b47

Please sign in to comment.