Ignore:
Timestamp:
Aug 22, 2017 5:59:29 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:
b2a5042
Parents:
457d961
Message:

Use singleton QApplication in unit tests to avoid issues on Ubuntu. SASVIEW-485

File:
1 edited

Legend:

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

    rdc5ef15 r464cd07  
    2525import sas.qtgui.Plotting.PlotHelper as PlotHelper 
    2626 
    27 app = QApplication(sys.argv) 
     27if not QApplication.instance(): 
     28    app = QApplication(sys.argv) 
    2829 
    2930class DataExplorerTest(unittest.TestCase): 
     
    441442        # Click on the Help button 
    442443        QTest.mouseClick(button1, Qt.LeftButton) 
    443         qApp.processEvents() 
     444        QtGui.qApp.processEvents() 
    444445 
    445446        # Check the browser 
     
    450451        # Click on the Help_2 button 
    451452        QTest.mouseClick(button2, Qt.LeftButton) 
    452         qApp.processEvents() 
     453        QtGui.qApp.processEvents() 
    453454        # Check the browser 
    454455        self.assertIn(partial_url, str(self.form._helpView.url())) 
Note: See TracChangeset for help on using the changeset viewer.