Skip to content

Commit

Permalink
Comment out other code
Browse files Browse the repository at this point in the history
  • Loading branch information
soininen committed Sep 11, 2023
1 parent a41b5ed commit 90ff4cc
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions tests/test_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,26 +51,26 @@


class TestBase(unittest.TestCase):
# @classmethod
# def setUpClass(cls):
# print("Do we even get here?")
# time.sleep(1)
# if not QApplication.instance():
# QApplication()

def setUp(self):
print("*** setUp() start ***")
@classmethod
def setUpClass(cls):
print("Do we even get here?")
time.sleep(1)
with patch("spinetoolbox.spine_db_editor.widgets.spine_db_editor.SpineDBEditor.restore_ui"), patch(
"spinetoolbox.spine_db_editor.widgets.spine_db_editor.SpineDBEditor.show"
):
mock_settings = Mock()
mock_settings.value.side_effect = lambda *args, **kwargs: 0
self._db_mngr = TestSpineDBManager(mock_settings, None)
logger = MagicMock()
self._db_map = self._db_mngr.get_db_map("sqlite://", logger, codename="test database", create=True)
self._db_editor = SpineDBEditor(self._db_mngr, {"sqlite://": "test database"})
print("*** setUp() end ***")
if not QApplication.instance():
QApplication()

# def setUp(self):
# print("*** setUp() start ***")
# time.sleep(1)
# with patch("spinetoolbox.spine_db_editor.widgets.spine_db_editor.SpineDBEditor.restore_ui"), patch(
# "spinetoolbox.spine_db_editor.widgets.spine_db_editor.SpineDBEditor.show"
# ):
# mock_settings = Mock()
# mock_settings.value.side_effect = lambda *args, **kwargs: 0
# self._db_mngr = TestSpineDBManager(mock_settings, None)
# logger = MagicMock()
# self._db_map = self._db_mngr.get_db_map("sqlite://", logger, codename="test database", create=True)
# self._db_editor = SpineDBEditor(self._db_mngr, {"sqlite://": "test database"})
# print("*** setUp() end ***")

def tearDown(self):
with patch("spinetoolbox.spine_db_editor.widgets.spine_db_editor.QMessageBox") as message_box:
Expand Down

0 comments on commit 90ff4cc

Please sign in to comment.