Ignore:
Timestamp:
Jun 8, 2016 7:56:28 AM (8 years ago)
Author:
Piotr Rozyczko <piotr.rozyczko@…>
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 07:53:59)
git-committer:
Piotr Rozyczko <piotr.rozyczko@…> (06/08/16 07:56:28)
Message:

Hold data objects in model. Added more Data Explorer functionality. Added unit tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/UnitTesting/WelcomePanelTest.py

    rf721030 r488c49d  
     1import sys 
     2import unittest 
     3 
     4from PyQt4.QtGui import * 
     5from PyQt4.QtTest import QTest 
     6from PyQt4.QtCore import * 
     7 
     8# Local 
     9from WelcomePanel import WelcomePanel 
     10 
     11app = QApplication(sys.argv) 
     12 
     13class 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        
     40if __name__ == "__main__": 
     41    unittest.main() 
Note: See TracChangeset for help on using the changeset viewer.