Changeset ff49d4d in sasview for src/sas/qtgui


Ignore:
Timestamp:
Aug 5, 2016 9:01:43 AM (8 years ago)
Author:
Piotr Rozyczko <piotr.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:
51b2b51
Parents:
af7078b
Message:

Added unit test for the new docked widget

Location:
src/sas/qtgui
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/GuiManager.py

    r1af348e rff49d4d  
    2222from UI.AcknowledgementsUI import Acknowledgements 
    2323from AboutBox import AboutBox 
     24from IPythonWidget import IPythonWidget 
    2425 
    2526# Perspectives 
     
    537538        Display the Jupyter console as a docked widget. 
    538539        """ 
    539         from IPythonWidget import IPythonWidget 
    540540        terminal = IPythonWidget() 
    541541 
  • src/sas/qtgui/IPythonWidget.py

    r1af348e rff49d4d  
    2727        self.kernel_manager.kernel.shell.run_code( 
    2828            '\n'.join('import %s as %s' % t for t in MODULES_TO_IMPORT)) 
    29  
    30         guisupport.start_event_loop_qt4(app) 
  • src/sas/qtgui/UnitTesting/GuiManagerTest.py

    r0cd8612 rff49d4d  
    1616from AboutBox import AboutBox 
    1717from WelcomePanel import WelcomePanel 
     18from IPythonWidget import IPythonWidget 
    1819 
    1920from GuiManager import GuiManager 
     
    8586        self.assertIn(message_logged, self.manager.logDockWidget.widget().toPlainText()) 
    8687 
     88    def testConsole(self): 
     89        """ 
     90        Test the docked QtConsole 
     91        """ 
     92        # Invoke the console action 
     93        self.manager.actionPython_Shell_Editor() 
     94 
     95        # Test the widegt properties 
     96        self.assertIsInstance(self.manager.ipDockWidget, QDockWidget) 
     97        self.assertIsInstance(self.manager.ipDockWidget.widget(), IPythonWidget) 
     98        self.assertEqual(self.manager._workspace.dockWidgetArea(self.manager.ipDockWidget), Qt.RightDockWidgetArea) 
     99 
    87100    def testUpdatePerspective(self): 
    88101        """ 
Note: See TracChangeset for help on using the changeset viewer.