Ignore:
Timestamp:
Nov 9, 2017 6: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 07:22:45)
git-committer:
Piotr Rozyczko <rozyczko@…> (11/09/17 06:45:20)
Message:

Converted unit tests

File:
1 edited

Legend:

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

    r4992ff2 r53c771e  
    33from unittest.mock import MagicMock 
    44 
    5 from PyQt4 import QtGui 
    6 from PyQt4 import QtCore 
    7 from PyQt4 import QtTest 
    8 from PyQt4 import QtWebKit 
     5from PyQt5 import QtGui, QtWidgets 
     6from PyQt5 import QtCore 
     7from PyQt5 import QtTest 
     8from PyQt5 import QtWebKit 
    99 
    1010# set up import paths 
     
    1616from sas.qtgui.Plotting.SlicerParameters import SlicerParameters 
    1717 
    18 if not QtGui.QApplication.instance(): 
    19     app = QtGui.QApplication(sys.argv) 
     18if not QtWidgets.QApplication.instance(): 
     19    app = QtWidgets.QApplication(sys.argv) 
    2020 
    2121class SlicerParametersTest(unittest.TestCase): 
     
    3838        #self.widget.mapper 
    3939        self.assertIsInstance(self.widget.proxy, QtCore.QIdentityProxyModel) 
    40         self.assertIsInstance(self.widget.lstParams.itemDelegate(), QtGui.QStyledItemDelegate) 
     40        self.assertIsInstance(self.widget.lstParams.itemDelegate(), QtWidgets.QStyledItemDelegate) 
    4141        self.assertTrue(self.widget.lstParams.model().columnReadOnly(0)) 
    4242        self.assertFalse(self.widget.lstParams.model().columnReadOnly(1)) 
     
    6262        spy_close = QtSignalSpy(self.widget, self.widget.close_signal) 
    6363        # Click on the "Close" button 
    64         QtTest.QTest.mouseClick(self.widget.buttonBox.button(QtGui.QDialogButtonBox.Close), QtCore.Qt.LeftButton) 
     64        QtTest.QTest.mouseClick(self.widget.buttonBox.button(QtWidgets.QDialogButtonBox.Close), QtCore.Qt.LeftButton) 
    6565        # Check the signal 
    6666        self.assertEqual(spy_close.count(), 1) 
     
    6868        self.assertFalse(self.widget.isVisible()) 
    6969 
    70     def testOnHelp(self): 
     70    def notestOnHelp(self): 
    7171        ''' Assure clicking on help returns QtWeb view on requested page''' 
    7272        self.widget.show() 
Note: See TracChangeset for help on using the changeset viewer.