Changeset adf81b8 in sasview for src/sas/qtgui/UnitTesting
- Timestamp:
- Nov 29, 2016 8:08:29 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:
- 8548d739
- Parents:
- e84ccf5
- git-author:
- Piotr Rozyczko <rozyczko@…> (11/29/16 02:56:47)
- git-committer:
- Piotr Rozyczko <rozyczko@…> (11/29/16 08:08:29)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/UnitTesting/WelcomePanelTest.py
r31c5b58 radf81b8 2 2 import unittest 3 3 4 from PyQt4.QtGui import * 5 from PyQt4.QtTest import QTest 6 from PyQt4.QtCore import * 4 from PyQt4 import QtGui 7 5 8 6 # set up import paths … … 12 10 from WelcomePanel import WelcomePanel 13 11 14 app = Q Application(sys.argv)12 app = QtGui.QApplication(sys.argv) 15 13 16 14 class WelcomePanelTest(unittest.TestCase): … … 28 26 def testDefaults(self): 29 27 '''Test the GUI in its default state''' 30 self.assertIsInstance(self.widget, Q Dialog)28 self.assertIsInstance(self.widget, QtGui.QDialog) 31 29 self.assertEqual(self.widget.windowTitle(), "Welcome") 32 30 33 31 def testVersion(self): 34 """ 35 """ 32 '''Test the version string''' 36 33 version = self.widget.lblVersion 37 self.assertIsInstance(version, Q Label)38 ver_text = "\nSasView 4.0.0-alpha\nBuild: 1\n(c) 2009 - 2013, UTK, UMD, NIST, ORNL, ISIS, ESS and IL" 39 #self.assertEqual(str(version.text()), ver_text)40 self.assertIn(" SasView", str(version.text()))41 self.assertIn(" Build:", str(version.text()))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()) 42 39 43 40 if __name__ == "__main__":
Note: See TracChangeset
for help on using the changeset viewer.