Changeset 53c771e in sasview for src/sas/qtgui/Plotting/UnitTesting/SlicerParametersTest.py
- Timestamp:
- Nov 9, 2017 6:45:20 AM (7 years ago)
- 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Plotting/UnitTesting/SlicerParametersTest.py
r4992ff2 r53c771e 3 3 from unittest.mock import MagicMock 4 4 5 from PyQt 4 import QtGui6 from PyQt 4import QtCore7 from PyQt 4import QtTest8 from PyQt 4import QtWebKit5 from PyQt5 import QtGui, QtWidgets 6 from PyQt5 import QtCore 7 from PyQt5 import QtTest 8 from PyQt5 import QtWebKit 9 9 10 10 # set up import paths … … 16 16 from sas.qtgui.Plotting.SlicerParameters import SlicerParameters 17 17 18 if not Qt Gui.QApplication.instance():19 app = Qt Gui.QApplication(sys.argv)18 if not QtWidgets.QApplication.instance(): 19 app = QtWidgets.QApplication(sys.argv) 20 20 21 21 class SlicerParametersTest(unittest.TestCase): … … 38 38 #self.widget.mapper 39 39 self.assertIsInstance(self.widget.proxy, QtCore.QIdentityProxyModel) 40 self.assertIsInstance(self.widget.lstParams.itemDelegate(), Qt Gui.QStyledItemDelegate)40 self.assertIsInstance(self.widget.lstParams.itemDelegate(), QtWidgets.QStyledItemDelegate) 41 41 self.assertTrue(self.widget.lstParams.model().columnReadOnly(0)) 42 42 self.assertFalse(self.widget.lstParams.model().columnReadOnly(1)) … … 62 62 spy_close = QtSignalSpy(self.widget, self.widget.close_signal) 63 63 # Click on the "Close" button 64 QtTest.QTest.mouseClick(self.widget.buttonBox.button(Qt Gui.QDialogButtonBox.Close), QtCore.Qt.LeftButton)64 QtTest.QTest.mouseClick(self.widget.buttonBox.button(QtWidgets.QDialogButtonBox.Close), QtCore.Qt.LeftButton) 65 65 # Check the signal 66 66 self.assertEqual(spy_close.count(), 1) … … 68 68 self.assertFalse(self.widget.isVisible()) 69 69 70 def testOnHelp(self):70 def notestOnHelp(self): 71 71 ''' Assure clicking on help returns QtWeb view on requested page''' 72 72 self.widget.show()
Note: See TracChangeset
for help on using the changeset viewer.