Ignore:
Timestamp:
Nov 8, 2017 9:22:45 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:
0e80658
Parents:
412e069e
Message:

Converted unit tests

File:
1 edited

Legend:

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

    r99ea1b0 r3e8dee3  
    33from unittest.mock import MagicMock 
    44 
    5 from PyQt4 import QtGui 
    6 from PyQt4 import QtCore 
     5from PyQt5 import QtGui,QtWidgets 
     6from PyQt5 import QtCore 
    77 
    88# set up import paths 
     
    1212from sas.qtgui.Plotting.BoxSum import BoxSum 
    1313 
    14 if not QtGui.QApplication.instance(): 
    15     app = QtGui.QApplication(sys.argv) 
     14if not QtWidgets.QApplication.instance(): 
     15    app = QtWidgets.QApplication(sys.argv) 
    1616 
    1717class BoxSumTest(unittest.TestCase): 
     
    3333    def testDefaults(self): 
    3434        '''Test the GUI in its default state''' 
    35         self.assertIsInstance(self.widget.mapper.mappedWidgetAt(0), QtGui.QLineEdit) 
    36         self.assertIsInstance(self.widget.mapper.mappedWidgetAt(1), QtGui.QLineEdit) 
    37         self.assertIsInstance(self.widget.mapper.mappedWidgetAt(2), QtGui.QLineEdit) 
    38         self.assertIsInstance(self.widget.mapper.mappedWidgetAt(3), QtGui.QLineEdit) 
    39         self.assertIsInstance(self.widget.mapper.mappedWidgetAt(4), QtGui.QLabel) 
    40         self.assertIsInstance(self.widget.mapper.mappedWidgetAt(5), QtGui.QLabel) 
    41         self.assertIsInstance(self.widget.mapper.mappedWidgetAt(6), QtGui.QLabel) 
    42         self.assertIsInstance(self.widget.mapper.mappedWidgetAt(7), QtGui.QLabel) 
    43         self.assertIsInstance(self.widget.mapper.mappedWidgetAt(8), QtGui.QLabel) 
     35        self.assertIsInstance(self.widget.mapper.mappedWidgetAt(0), QtWidgets.QLineEdit) 
     36        self.assertIsInstance(self.widget.mapper.mappedWidgetAt(1), QtWidgets.QLineEdit) 
     37        self.assertIsInstance(self.widget.mapper.mappedWidgetAt(2), QtWidgets.QLineEdit) 
     38        self.assertIsInstance(self.widget.mapper.mappedWidgetAt(3), QtWidgets.QLineEdit) 
     39        self.assertIsInstance(self.widget.mapper.mappedWidgetAt(4), QtWidgets.QLabel) 
     40        self.assertIsInstance(self.widget.mapper.mappedWidgetAt(5), QtWidgets.QLabel) 
     41        self.assertIsInstance(self.widget.mapper.mappedWidgetAt(6), QtWidgets.QLabel) 
     42        self.assertIsInstance(self.widget.mapper.mappedWidgetAt(7), QtWidgets.QLabel) 
     43        self.assertIsInstance(self.widget.mapper.mappedWidgetAt(8), QtWidgets.QLabel) 
    4444         
    4545         
Note: See TracChangeset for help on using the changeset viewer.