def setup_pidlockfile_fixtures(testcase, scenario_name=None):
 setup_pidfile_fixtures(testcase)
 scaffold.mock('pidlockfile.write_pid_to_pidfile', tracker=testcase.mock_tracker)
 scaffold.mock('pidlockfile.remove_existing_pidfile', tracker=testcase.mock_tracker)
 if (scenario_name is not None):
  set_pidlockfile_scenario(testcase, scenario_name, clear_tracker=False)

def setup_pidlockfile_fixtures ( testcase , scenario_name = None ) : setup_pidfile_fixtures ( testcase ) scaffold . mock ( 'pidlockfile.write_pid_to_pidfile' , tracker = testcase . mock_tracker ) scaffold . mock ( 'pidlockfile.remove_existing_pidfile' , tracker = testcase . mock_tracker ) if ( scenario_name is not None ) : set_pidlockfile_scenario ( testcase , scenario_name , clear_tracker = False )
set up common fixtures for pidlockfile test cases .