Ignore:
Timestamp:
Nov 9, 2017 6:45:20 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:
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)
Message:

Converted unit tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/MainWindow/UnitTesting/GuiManagerTest.py

    r7fb471d r53c771e  
    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.