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

Converted unit tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Calculators/UnitTesting/DataOperationUtilityTest.py

    r99ea1b0 r3e8dee3  
    44import logging 
    55import unittest 
    6 from PyQt4 import QtGui 
    7 from PyQt4 import QtCore 
    8 from PyQt4.QtTest import QTest 
    9 from PyQt4.QtCore import Qt 
     6from PyQt5 import QtGui, QtWidgets 
     7from PyQt5 import QtCore 
     8from PyQt5.QtTest import QTest 
     9from PyQt5.QtCore import Qt 
    1010from unittest.mock import MagicMock 
    1111from unittest.mock import patch 
     
    1919from sas.qtgui.MainWindow.DataState import DataState 
    2020 
    21 if not QtGui.QApplication.instance(): 
    22     app = QtGui.QApplication(sys.argv) 
     21if not QtWidgets.QApplication.instance(): 
     22    app = QtWidgets.QApplication(sys.argv) 
    2323 
    2424BG_COLOR_ERR = 'background-color: rgb(244, 170, 164);' 
     
    4343        """Test the GUI in its default state""" 
    4444 
    45         self.assertIsInstance(self.widget, QtGui.QDialog) 
     45        self.assertIsInstance(self.widget, QtWidgets.QDialog) 
    4646 
    4747        self.assertEqual(self.widget.windowTitle(), "Data Operation") 
     
    9898        self.assertFalse(self.widget.txtNumber.isEnabled()) 
    9999 
    100         self.assertIsInstance(self.widget.layoutOutput,QtGui.QHBoxLayout) 
    101         self.assertIsInstance(self.widget.layoutData1,QtGui.QHBoxLayout) 
    102         self.assertIsInstance(self.widget.layoutData2,QtGui.QHBoxLayout) 
     100        self.assertIsInstance(self.widget.layoutOutput,QtWidgets.QHBoxLayout) 
     101        self.assertIsInstance(self.widget.layoutData1,QtWidgets.QHBoxLayout) 
     102        self.assertIsInstance(self.widget.layoutData2,QtWidgets.QHBoxLayout) 
    103103 
    104104        # To store input datafiles 
Note: See TracChangeset for help on using the changeset viewer.