def _makeRunner(config):
 cls = runner.TrialRunner
 args = {'reporterFactory': config['reporter'], 'tracebackFormat': config['tbformat'], 'realTimeErrors': config['rterrors'], 'uncleanWarnings': config['unclean-warnings'], 'logfile': config['logfile'], 'workingDirectory': config['temp-directory']}
 if config['dry-run']:
  args['mode'] = runner.TrialRunner.DRY_RUN
 elif config['jobs']:
  from twisted.trial._dist.disttrial import DistTrialRunner
  cls = DistTrialRunner
  args['workerNumber'] = config['jobs']
  args['workerArguments'] = config._getWorkerArguments()
 else:
  if config['debug']:
   args['mode'] = runner.TrialRunner.DEBUG
   debugger = config['debugger']
   if (debugger != 'pdb'):
    try:
     args['debugger'] = reflect.namedAny(debugger)
    except reflect.ModuleNotFound:
     raise _DebuggerNotFound(('%r debugger could not be found.' % (debugger,)))
   else:
    args['debugger'] = _wrappedPdb()
  args['exitFirst'] = config['exitfirst']
  args['profile'] = config['profile']
  args['forceGarbageCollection'] = config['force-gc']
 return cls(**args)

def _makeRunner ( config ) : cls = runner . TrialRunner args = { 'reporterFactory' : config [ 'reporter' ] , 'tracebackFormat' : config [ 'tbformat' ] , 'realTimeErrors' : config [ 'rterrors' ] , 'uncleanWarnings' : config [ 'unclean-warnings' ] , 'logfile' : config [ 'logfile' ] , 'workingDirectory' : config [ 'temp-directory' ] } if config [ 'dry-run' ] : args [ 'mode' ] = runner . TrialRunner . DRY_RUN elif config [ 'jobs' ] : from twisted . trial . _dist . disttrial import DistTrialRunner cls = DistTrialRunner args [ 'workerNumber' ] = config [ 'jobs' ] args [ 'workerArguments' ] = config . _getWorkerArguments ( ) else : if config [ 'debug' ] : args [ 'mode' ] = runner . TrialRunner . DEBUG debugger = config [ 'debugger' ] if ( debugger != 'pdb' ) : try : args [ 'debugger' ] = reflect . namedAny ( debugger ) except reflect . ModuleNotFound : raise _DebuggerNotFound ( ( '%r debugger could not be found.' % ( debugger , ) ) ) else : args [ 'debugger' ] = _wrappedPdb ( ) args [ 'exitFirst' ] = config [ 'exitfirst' ] args [ 'profile' ] = config [ 'profile' ] args [ 'forceGarbageCollection' ] = config [ 'force-gc' ] return cls ( ** args )
return a trial runner class set up with the parameters extracted from c{config} .