Ignore:
Timestamp:
Nov 9, 2017 8:45:20 AM (6 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:
dd150ef
Parents:
d6b8a1d
git-author:
Piotr Rozyczko <rozyczko@…> (11/08/17 09:22:45)
git-committer:
Piotr Rozyczko <rozyczko@…> (11/09/17 08:45:20)
Message:

Converted unit tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Plotting/UnitTesting/WindowTitleTest.py

    r464cd07 r53c771e  
    22import unittest 
    33 
    4 from PyQt4 import QtGui 
     4from PyQt5 import QtGui, QtWidgets 
    55 
    66# set up import paths 
     
    1010from sas.qtgui.Plotting.WindowTitle import WindowTitle 
    1111 
    12 if not QtGui.QApplication.instance(): 
    13     app = QtGui.QApplication(sys.argv) 
     12if not QtWidgets.QApplication.instance(): 
     13    app = QtWidgets.QApplication(sys.argv) 
    1414 
    1515class WindowTitleTest(unittest.TestCase): 
     
    2727        '''Test the GUI in its default state''' 
    2828        self.widget.show() 
    29         self.assertIsInstance(self.widget, QtGui.QDialog) 
     29        self.assertIsInstance(self.widget, QtWidgets.QDialog) 
    3030        self.assertEqual(self.widget.windowTitle(), "Modify Window Title") 
    3131         
     
    3333        '''Modify the title''' 
    3434        self.widget.show() 
    35         QtGui.qApp.processEvents() 
     35        QtWidgets.qApp.processEvents() 
    3636        # make sure we have the pre-set title 
    3737        self.assertEqual(self.widget.txtTitle.text(), "some title") 
     
    3939        self.widget.txtTitle.clear() 
    4040        self.widget.txtTitle.setText("5 elephants") 
    41         QtGui.qApp.processEvents() 
     41        QtWidgets.qApp.processEvents() 
    4242        # Retrieve value 
    4343        new_title = self.widget.title() 
Note: See TracChangeset for help on using the changeset viewer.