Changeset 53c771e in sasview for src/sas/qtgui/MainWindow/UnitTesting/AboutBoxTest.py
- Timestamp:
- Nov 9, 2017 8:45:20 AM (6 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 09:22:45)
- git-committer:
- Piotr Rozyczko <rozyczko@…> (11/09/17 08:45:20)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/MainWindow/UnitTesting/AboutBoxTest.py
r7fb471d r53c771e 3 3 import webbrowser 4 4 5 from PyQt 4 import QtGui6 from PyQt 4.QtTest import QTest7 from PyQt 4import QtCore5 from PyQt5 import QtGui, QtWidgets 6 from PyQt5.QtTest import QTest 7 from PyQt5 import QtCore 8 8 from unittest.mock import MagicMock 9 9 … … 15 15 import sas.qtgui.Utilities.LocalConfig as LocalConfig 16 16 17 if not Qt Gui.QApplication.instance():18 app = Qt Gui.QApplication(sys.argv)17 if not QtWidgets.QApplication.instance(): 18 app = QtWidgets.QApplication(sys.argv) 19 19 20 20 class AboutBoxTest(unittest.TestCase): … … 31 31 def testDefaults(self): 32 32 '''Test the GUI in its default state''' 33 self.assertIsInstance(self.widget, Qt Gui.QWidget)33 self.assertIsInstance(self.widget, QtWidgets.QWidget) 34 34 self.assertEqual(self.widget.windowTitle(), "About") 35 35 self.assertEqual(self.widget.cmdOK.text(), "OK") … … 45 45 """ 46 46 version = self.widget.lblVersion 47 self.assertIsInstance(version, Qt Gui.QLabel)47 self.assertIsInstance(version, QtWidgets.QLabel) 48 48 self.assertEqual(str(version.text()), str(LocalConfig.__version__)) 49 49 … … 53 53 """ 54 54 about = self.widget.lblAbout 55 self.assertIsInstance(about, Qt Gui.QLabel)55 self.assertIsInstance(about, QtWidgets.QLabel) 56 56 # build version 57 57 self.assertIn(str(LocalConfig.__build__), about.text()) … … 83 83 84 84 # Press the buttons 85 buttonList = self.widget.findChildren(Qt Gui.QPushButton)85 buttonList = self.widget.findChildren(QtWidgets.QPushButton) 86 86 for button in buttonList: 87 87 QTest.mouseClick(button, QtCore.Qt.LeftButton)
Note: See TracChangeset
for help on using the changeset viewer.