Changeset adf81b8 in sasview for src/sas/qtgui/UnitTesting


Ignore:
Timestamp:
Nov 29, 2016 8:08:29 AM (7 years ago)
Author:
Piotr Rozyczko <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:
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)
Message:

Minor performance impromevements in DE

File:
1 edited

Legend:

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

    r31c5b58 radf81b8  
    22import unittest 
    33 
    4 from PyQt4.QtGui import * 
    5 from PyQt4.QtTest import QTest 
    6 from PyQt4.QtCore import * 
     4from PyQt4 import QtGui 
    75 
    86# set up import paths 
     
    1210from WelcomePanel import WelcomePanel 
    1311 
    14 app = QApplication(sys.argv) 
     12app = QtGui.QApplication(sys.argv) 
    1513 
    1614class WelcomePanelTest(unittest.TestCase): 
     
    2826    def testDefaults(self): 
    2927        '''Test the GUI in its default state''' 
    30         self.assertIsInstance(self.widget, QDialog) 
     28        self.assertIsInstance(self.widget, QtGui.QDialog) 
    3129        self.assertEqual(self.widget.windowTitle(), "Welcome") 
    3230         
    3331    def testVersion(self): 
    34         """ 
    35         """ 
     32        '''Test the version string''' 
    3633        version = self.widget.lblVersion 
    37         self.assertIsInstance(version, QLabel) 
    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()) 
    4239        
    4340if __name__ == "__main__": 
Note: See TracChangeset for help on using the changeset viewer.