#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# select_type_patch = mock . patch . multiple ( select_connection , SELECT_TYPE = activate_poller_patch . SELECT_POLLER ) #NEWLINE# select_type_patch . start ( ) #NEWLINE# self . addCleanup ( select_type_patch . stop ) #NEWLINE# self . ioloop = select_connection . IOLoop ( ) #NEWLINE# self . addCleanup ( setattr , self , 'ioloop' , None ) #NEWLINE# activate_poller_patch = mock . patch . object ( self . ioloop . _poller , 'activate_poller' , wraps = self . ioloop . _poller . activate_poller ) #NEWLINE# activate_poller_patch . start ( ) #NEWLINE# self . addCleanup ( activate_poller_patch . stop ) #NEWLINE# deactivate_poller_patch = mock . patch . object ( self . ioloop . _poller , 'deactivate_poller' , wraps = self . ioloop . _poller . deactivate_poller ) #NEWLINE# deactivate_poller_patch . start ( ) #NEWLINE# self . addCleanup ( deactivate_poller_patch . stop )