source: sasview/src/sas/qtgui/UnitTesting/MainWindowTest.py @ f721030

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalc
Last change on this file since f721030 was f721030, checked in by Piotr Rozyczko <piotr.rozyczko@…>, 8 years ago

Initial commit of the main window prototype

  • Property mode set to 100755
File size: 948 bytes
Line 
1import sys
2import unittest
3
4from PyQt4.QtGui import *
5from PyQt4.QtTest import QTest
6from PyQt4.QtCore import *
7from mock import MagicMock
8
9# Local
10from MainWindow import MainSasViewWindow
11from MainWindow import SplashScreen
12
13app = QApplication(sys.argv)
14
15class MainWindowTest(unittest.TestCase):
16    '''Test the Main Window GUI'''
17    def setUp(self):
18        '''Create the GUI'''
19
20        self.widget = MainSasViewWindow(None)
21
22    def tearDown(self):
23        '''Destroy the GUI'''
24        self.widget.close()
25        self.widget = None
26
27    def testDefaults(self):
28        '''Test the GUI in its default state'''
29        self.assertIsInstance(self.widget, QMainWindow)
30        self.assertIsInstance(self.widget.centralWidget(), QWorkspace)
31       
32    def testSplashScreen(self):
33        """
34        """
35        splash = SplashScreen()
36        self.assertIsInstance(splash, QSplashScreen)
37       
38if __name__ == "__main__":
39    unittest.main()
Note: See TracBrowser for help on using the repository browser.