def set_pidlockfile_scenario(testcase, scenario_name, clear_tracker=True):
 testcase.scenario = testcase.pidlockfile_scenarios[scenario_name]
 setup_lockfile_method_mocks(testcase, testcase.scenario, 'lockfile.LinkFileLock')
 testcase.pidlockfile_args = dict(path=testcase.scenario['path'])
 testcase.test_instance = pidlockfile.PIDLockFile(**testcase.pidlockfile_args)
 if clear_tracker:
  testcase.mock_tracker.clear()

def set_pidlockfile_scenario ( testcase , scenario_name , clear_tracker = True ) : testcase . scenario = testcase . pidlockfile_scenarios [ scenario_name ] setup_lockfile_method_mocks ( testcase , testcase . scenario , 'lockfile.LinkFileLock' ) testcase . pidlockfile_args = dict ( path = testcase . scenario [ 'path' ] ) testcase . test_instance = pidlockfile . PIDLockFile ( ** testcase . pidlockfile_args ) if clear_tracker : testcase . mock_tracker . clear ( )
set up the test case to the specified scenario .