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 ba0dc71 was
488c49d,
checked in by Piotr Rozyczko <piotr.rozyczko@…>, 8 years ago
|
Hold data objects in model. Added more Data Explorer functionality. Added unit tests.
|
-
Property mode set to
100755
|
File size:
1.1 KB
|
Rev | Line | |
---|
[488c49d] | 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
TracBrowser
for help on using the repository browser.