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 886d2f2c 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
|
Line | |
---|
1 | import sys |
---|
2 | import unittest |
---|
3 | |
---|
4 | from PyQt4 import QtGui |
---|
5 | |
---|
6 | # set up import paths |
---|
7 | import path_prepare |
---|
8 | |
---|
9 | # Local |
---|
10 | from WelcomePanel import WelcomePanel |
---|
11 | |
---|
12 | app = QtGui.QApplication(sys.argv) |
---|
13 | |
---|
14 | class 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''' |
---|
28 | self.assertIsInstance(self.widget, QtGui.QDialog) |
---|
29 | self.assertEqual(self.widget.windowTitle(), "Welcome") |
---|
30 | |
---|
31 | def testVersion(self): |
---|
32 | '''Test the version string''' |
---|
33 | version = self.widget.lblVersion |
---|
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()) |
---|
39 | |
---|
40 | if __name__ == "__main__": |
---|
41 | unittest.main() |
---|
Note: See
TracBrowser
for help on using the repository browser.