Ignore:
Timestamp:
Jun 14, 2016 4:51:18 AM (8 years ago)
Author:
Piotr Rozyczko <piotr.rozyczko@…>
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
Message:

threaded file load, data object related fixes, more unit tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/UnitTesting/GuiManagerTest.py

    r488c49d r5032ea68  
    99# Local 
    1010from GuiManager import GuiManager 
     11from UI.MainWindowUI import MainWindow 
    1112 
    12 #app = QApplication(sys.argv) 
     13app = QApplication(sys.argv) 
    1314 
    1415class GuiManagerTest(unittest.TestCase): 
    15     '''Test the WelcomePanel''' 
     16    '''Test the Main Window functionality''' 
    1617    def setUp(self): 
    1718        '''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) 
    1827 
    19         self.manager = GuiManager(None) 
     28        self.manager = GuiManager(MainSasViewWindow(None), None) 
    2029 
    2130    def tearDown(self): 
     
    5261        pass 
    5362 
     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 
    5477    # test each action separately 
    5578        
Note: See TracChangeset for help on using the changeset viewer.