@@ -228,57 +228,13 @@ def tearDown(self):
228
228
shutil .rmtree ("Test Folder" )
229
229
230
230
231
- @skip_ci
232
- class TestMainWindowWithSessionManagementCreateLoadSessionDialog (unittest .TestCase ):
233
- '''
234
- Tests the createLoadSessionDialog method of the MainWindowWithSessionManagement class
235
-
236
- This method is responsible for creating the load session dialog
237
- and populating it with the available sessions
238
- '''
239
- def setUp (self ):
240
- self .title = "title"
241
- self .app_name = "app_name"
242
- self .smw = MainWindowWithSessionManagement (self .title , self .app_name )
243
- self .smw .sessions_directory = mock .MagicMock ()
244
- self .zip_folders = ["zip_folder_1" , "zip_folder_2" ]
245
-
246
- def test_createLoadSessionDialog_populates_session_dropdown (self ):
247
- dialog = self .smw .createLoadSessionDialog (self .zip_folders )
248
- assert dialog is not None
249
- assert isinstance (dialog , eqt .ui .SessionDialogs .LoadSessionDialog )
250
- select_session_combo = dialog .getWidget ('select_session' )
251
- assert select_session_combo is not None
252
- items_in_combo = [
253
- select_session_combo .itemText (i ) for i in range (select_session_combo .count ())]
254
- assert items_in_combo == self .zip_folders
255
-
256
- def test_createLoadSessionDialog_connections (self ):
257
- dialog = self .smw .createLoadSessionDialog (self .zip_folders )
258
-
259
- self .smw .loadSessionLoad = mock .MagicMock ()
260
- self .smw .selectLoadSessionsDirectorySelectedInSessionSelector = mock .MagicMock ()
261
- self .smw .loadSessionNew = mock .MagicMock ()
262
-
263
- dialog = self .smw .createLoadSessionDialog (self .zip_folders )
264
-
265
- dialog .Ok .click ()
266
- self .smw .loadSessionLoad .assert_called_once ()
267
-
268
- dialog .Select .click ()
269
- self .smw .selectLoadSessionsDirectorySelectedInSessionSelector .assert_called_with (dialog )
270
-
271
- dialog .Cancel .click ()
272
- self .smw .loadSessionNew .assert_called_once ()
273
-
274
-
275
231
@skip_ci
276
232
class TestSelectLoadSessionsDirectorySelectedInSessionSelector (unittest .TestCase ):
277
233
'''
278
234
Tests the `selectLoadSessionsDirectorySelectedInSessionSelector` method of the
279
235
`MainWindowWithSessionManagement` class
280
236
281
- This method sould close the passed dialog, and call
237
+ This method should close the passed dialog, and call
282
238
`createSessionsDirectorySelectionDialog(new_session=True)`
283
239
'''
284
240
def setUp (self ):
0 commit comments