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/MainWindow/UnitTesting/GuiManagerTest.py

    r99ea1b0 r3e8dee3  
    55import logging 
    66 
    7 from PyQt4.QtGui import * 
    8 from PyQt4.QtTest import QTest 
    9 from PyQt4.QtCore import * 
    10 from PyQt4.QtWebKit import * 
     7from PyQt5.QtGui import * 
     8from PyQt5.QtWidgets import * 
     9from PyQt5.QtTest import QTest 
     10from PyQt5.QtCore import * 
     11from PyQt5.QtWebKit import * 
    1112from unittest.mock import MagicMock 
    1213 
     
    1819from sas.qtgui.MainWindow.AboutBox import AboutBox 
    1920from sas.qtgui.MainWindow.WelcomePanel import WelcomePanel 
    20 from sas.qtgui.Utilities.IPythonWidget import IPythonWidget 
     21#from sas.qtgui.Utilities.IPythonWidget import IPythonWidget 
    2122 
    2223from sas.qtgui.MainWindow.GuiManager import Acknowledgements, GuiManager 
     
    3738         
    3839                # define workspace for dialogs. 
    39                 self.workspace = QWorkspace(self) 
     40                self.workspace = QMdiArea(self) 
    4041                self.setCentralWidget(self.workspace) 
    4142 
     
    221222        """ 
    222223        # Mock the system file open method 
    223         QFileDialog.getOpenFileNames = MagicMock(return_value=None) 
     224        QFileDialog.getOpenFileNames = MagicMock(return_value=('','')) 
    224225 
    225226        # invoke the action 
     
    234235        """ 
    235236        # Mock the system file open method 
    236         QFileDialog.getExistingDirectory = MagicMock(return_value=None) 
     237        QFileDialog.getExistingDirectory = MagicMock(return_value=('','')) 
    237238 
    238239        # invoke the action 
     
    270271 
    271272    #### HELP #### 
    272     def testActionDocumentation(self): 
     273    # test when PyQt5 works with html 
     274    def notestActionDocumentation(self): 
    273275        """ 
    274276        Menu Help/Documentation 
Note: See TracChangeset for help on using the changeset viewer.