Skip to content

Commit eb7a1aa

Browse files
author
Dimitar Tasev
committed
Remove test due to CI timeouts
1 parent 8be5fa6 commit eb7a1aa

File tree

1 file changed

+1
-34
lines changed

1 file changed

+1
-34
lines changed

mantidimaging/gui/windows/main/test/view_test.py

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@
2323
class MainWindowViewTest(unittest.TestCase):
2424
def setUp(self) -> None:
2525
with mock.patch("mantidimaging.gui.windows.main.view.WelcomeScreenPresenter"):
26-
with mock.patch("mantidimaging.gui.windows.main.view.has_other_shared_arrays", return_value=False):
27-
with mock.patch("mantidimaging.gui.windows.main.view.QMessageBox", return_value=False):
28-
self.view = MainWindowView()
26+
self.view = MainWindowView()
2927
self.presenter = mock.MagicMock()
3028
self.view.presenter = self.presenter
3129

@@ -308,34 +306,3 @@ def test_get_images_from_stack_uuid(self):
308306

309307
self.presenter.get_stack_visualiser.assert_called_once_with(uuid)
310308
self.assertEqual(images, return_value)
311-
312-
@mock.patch("mantidimaging.gui.windows.main.view.has_other_shared_arrays")
313-
@mock.patch("mantidimaging.gui.windows.main.view.free_all")
314-
@mock.patch("mantidimaging.gui.windows.main.view.QMessageBox")
315-
def test_ask_user_to_free_data(self, QMessageBox: Mock, free_all: Mock, has_other_shared_arrays: Mock):
316-
has_other_shared_arrays.return_value = True
317-
# makes the clickedButton the same return value mock as the addButton return
318-
QMessageBox.return_value.clickedButton.return_value = QMessageBox.return_value.addButton.return_value
319-
320-
self.view.ask_user_to_free_data()
321-
322-
QMessageBox.return_value.setWindowTitle.assert_called_once()
323-
QMessageBox.return_value.setText.assert_called_once()
324-
self.assertEquals(QMessageBox.return_value.addButton.call_count, 2)
325-
QMessageBox.return_value.exec.assert_called_once()
326-
free_all.assert_called_once()
327-
328-
@mock.patch("mantidimaging.gui.windows.main.view.has_other_shared_arrays")
329-
@mock.patch("mantidimaging.gui.windows.main.view.free_all")
330-
@mock.patch("mantidimaging.gui.windows.main.view.QMessageBox")
331-
def test_ask_user_to_free_data_ignore_pressed(self, QMessageBox: Mock, free_all: Mock,
332-
has_other_shared_arrays: Mock):
333-
has_other_shared_arrays.return_value = True
334-
335-
self.view.ask_user_to_free_data()
336-
337-
QMessageBox.return_value.setWindowTitle.assert_called_once()
338-
QMessageBox.return_value.setText.assert_called_once()
339-
self.assertEquals(QMessageBox.return_value.addButton.call_count, 2)
340-
QMessageBox.return_value.exec.assert_called_once()
341-
free_all.assert_not_called()

0 commit comments

Comments
 (0)