Changeset 488c49d in sasview for src/sas/qtgui/UnitTesting/WelcomePanelTest.py
- Timestamp:
- Jun 8, 2016 9:56:28 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:
- 5032ea68
- Parents:
- f721030
- git-author:
- Piotr Rozyczko <piotr.rozyczko@…> (06/08/16 09:53:59)
- git-committer:
- Piotr Rozyczko <piotr.rozyczko@…> (06/08/16 09:56:28)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/UnitTesting/WelcomePanelTest.py
rf721030 r488c49d 1 import sys 2 import unittest 3 4 from PyQt4.QtGui import * 5 from PyQt4.QtTest import QTest 6 from PyQt4.QtCore import * 7 8 # Local 9 from WelcomePanel import WelcomePanel 10 11 app = QApplication(sys.argv) 12 13 class WelcomePanelTest(unittest.TestCase): 14 '''Test the WelcomePanel''' 15 def setUp(self): 16 '''Create the WelcomePanel''' 17 18 self.widget = WelcomePanel(None) 19 20 def tearDown(self): 21 '''Destroy the GUI''' 22 self.widget.close() 23 self.widget = None 24 25 def testDefaults(self): 26 '''Test the GUI in its default state''' 27 self.assertIsInstance(self.widget, QDialog) 28 self.assertEqual(self.widget.windowTitle(), "Welcome") 29 30 def testVersion(self): 31 """ 32 """ 33 version = self.widget.lblVersion 34 self.assertIsInstance(version, QLabel) 35 ver_text = "\nSasView 4.0.0-alpha\nBuild: 1\n(c) 2009 - 2013, UTK, UMD, NIST, ORNL, ISIS, ESS and IL" 36 #self.assertEqual(str(version.text()), ver_text) 37 self.assertIn("SasView", str(version.text())) 38 self.assertIn("Build:", str(version.text())) 39 40 if __name__ == "__main__": 41 unittest.main()
Note: See TracChangeset
for help on using the changeset viewer.