Changeset 5032ea68 in sasview for src/sas/qtgui/UnitTesting/GuiManagerTest.py
- Timestamp:
- Jun 14, 2016 4:51:18 AM (8 years ago)
- Branches:
- ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- a281ab8
- Parents:
- 488c49d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/UnitTesting/GuiManagerTest.py
r488c49d r5032ea68 9 9 # Local 10 10 from GuiManager import GuiManager 11 from UI.MainWindowUI import MainWindow 11 12 12 #app = QApplication(sys.argv)13 app = QApplication(sys.argv) 13 14 14 15 class GuiManagerTest(unittest.TestCase): 15 '''Test the WelcomePanel'''16 '''Test the Main Window functionality''' 16 17 def setUp(self): 17 18 '''Create the tested object''' 19 class MainSasViewWindow(MainWindow): 20 # Main window of the application 21 def __init__(self, reactor, parent=None): 22 super(MainSasViewWindow, self).__init__(parent) 23 24 # define workspace for dialogs. 25 self.workspace = QWorkspace(self) 26 self.setCentralWidget(self.workspace) 18 27 19 self.manager = GuiManager( None)28 self.manager = GuiManager(MainSasViewWindow(None), None) 20 29 21 30 def tearDown(self): … … 52 61 pass 53 62 63 def testActionLoadData(self): 64 """ 65 Menu File/Load Data File(s) 66 """ 67 # Mock the system file open method 68 QFileDialog.getOpenFileName = MagicMock(return_value=None) 69 70 # invoke the action 71 72 # Test the getOpenFileName() dialog called once 73 #self.assertTrue(QtGui.QFileDialog.getOpenFileName.called) 74 #QtGui.QFileDialog.getOpenFileName.assert_called_once() 75 76 54 77 # test each action separately 55 78
Note: See TracChangeset
for help on using the changeset viewer.