def make_runner_scenarios():
 pidlockfile_scenarios = make_pidlockfile_scenarios()
 scenarios = {'simple': {'pidlockfile_scenario_name': 'simple'}, 'pidfile-locked': {'pidlockfile_scenario_name': 'exist-other-pid-locked'}}
 for scenario in scenarios.values():
  if ('pidlockfile_scenario_name' in scenario):
   pidlockfile_scenario = pidlockfile_scenarios.pop(scenario['pidlockfile_scenario_name'])
  scenario['pid'] = pidlockfile_scenario['pid']
  scenario['pidfile_path'] = pidlockfile_scenario['path']
  scenario['pidfile_timeout'] = 23
  scenario['pidlockfile_scenario'] = pidlockfile_scenario
 return scenarios

def make_runner_scenarios ( ) : pidlockfile_scenarios = make_pidlockfile_scenarios ( ) scenarios = { 'simple' : { 'pidlockfile_scenario_name' : 'simple' } , 'pidfile-locked' : { 'pidlockfile_scenario_name' : 'exist-other-pid-locked' } } for scenario in scenarios . values ( ) : if ( 'pidlockfile_scenario_name' in scenario ) : pidlockfile_scenario = pidlockfile_scenarios . pop ( scenario [ 'pidlockfile_scenario_name' ] ) scenario [ 'pid' ] = pidlockfile_scenario [ 'pid' ] scenario [ 'pidfile_path' ] = pidlockfile_scenario [ 'path' ] scenario [ 'pidfile_timeout' ] = 23 scenario [ 'pidlockfile_scenario' ] = pidlockfile_scenario return scenarios
make a collection of scenarios for testing daemonrunner instances .