source: sasview/src/sas/qtgui/UnitTesting/WelcomePanelTest.py @ b94889a

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 b94889a was adf81b8, checked in by Piotr Rozyczko <rozyczko@…>, 8 years ago

Minor performance impromevements in DE

  • Property mode set to 100644
File size: 1.0 KB
RevLine 
[488c49d]1import sys
2import unittest
3
[adf81b8]4from PyQt4 import QtGui
[488c49d]5
[31c5b58]6# set up import paths
7import path_prepare
8
[488c49d]9# Local
10from WelcomePanel import WelcomePanel
11
[adf81b8]12app = QtGui.QApplication(sys.argv)
[488c49d]13
14class WelcomePanelTest(unittest.TestCase):
15    '''Test the WelcomePanel'''
16    def setUp(self):
17        '''Create the WelcomePanel'''
18
19        self.widget = WelcomePanel(None)
20
21    def tearDown(self):
22        '''Destroy the GUI'''
23        self.widget.close()
24        self.widget = None
25
26    def testDefaults(self):
27        '''Test the GUI in its default state'''
[adf81b8]28        self.assertIsInstance(self.widget, QtGui.QDialog)
[488c49d]29        self.assertEqual(self.widget.windowTitle(), "Welcome")
30       
31    def testVersion(self):
[adf81b8]32        '''Test the version string'''
[488c49d]33        version = self.widget.lblVersion
[adf81b8]34        self.assertIsInstance(version, QtGui.QLabel)
35
36        self.assertIn("SasView", version.text())
37        self.assertIn("Build:", version.text())
38        self.assertIn("UTK, UMD, NIST, ORNL, ISIS, ESS, ILL and ANSTO", version.text())
[488c49d]39       
40if __name__ == "__main__":
41    unittest.main()
Note: See TracBrowser for help on using the repository browser.