#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# qt_app = QApplication . instance ( ) #NEWLINE# if ( qt_app is None ) : #NEWLINE# #INDENT# qt_app = QApplication ( [ ] ) #NEWLINE# #UNINDENT# self . qt_app = qt_app #NEWLINE# self . gui = GUI ( ) #NEWLINE# self . event_loop_helper = EventLoopHelper ( qt_app = self . qt_app , gui = self . gui ) #NEWLINE# self . traitsui_raise_patch = mock . patch ( 'traitsui.qt4.ui_base._StickyDialog.raise_' ) #NEWLINE# self . traitsui_raise_patch . start ( ) #NEWLINE# def new_activate( self ) : #NEWLINE# #INDENT# self . control . activateWindow ( ) #NEWLINE# #UNINDENT# self . pyface_raise_patch = mock . patch ( 'pyface.ui.qt4.window.Window.activate' , new_callable = ( lambda : new_activate ) ) #NEWLINE# self . pyface_raise_patch . start ( )