#NEWLINE# def set_trace( self ) : #NEWLINE# #INDENT# ' invoke PDB set_trace debugging, dropping any IO capturing. ' #NEWLINE# import _pytest.config #NEWLINE# frame = sys . _getframe ( ) . f_back #NEWLINE# if ( self . _pluginmanager is not None ) : #NEWLINE# #INDENT# capman = self . _pluginmanager . getplugin ( 'capturemanager' ) #NEWLINE# if capman : #NEWLINE# #INDENT# capman . suspendcapture ( in_ = True ) #NEWLINE# #UNINDENT# tw = _pytest . config . create_terminal_writer ( self . _config ) #NEWLINE# tw . line ( ) #NEWLINE# tw . sep ( '>' , 'PDB set_trace (IO-capturing turned off)' ) #NEWLINE# self . _pluginmanager . hook . pytest_enter_pdb ( config = tw . _config ) #NEWLINE# #UNINDENT# pdb . Pdb ( ) . set_trace ( frame )