class Test(unittest.TestCase): def setUp(self): self.pk = ProcessKiller(*tuple('abc')) def tearDown(self): pass def test_get_cmdline(self): self.assertTrue('a b c' in self.pk._get_cmdline()) def test_spawn_process_killer(self): # cannot test directly, see test_get_spawn_process_killer_cmdline() pass
def setUp(self): self.pk = ProcessKiller(*tuple('abc'))
def start_process_killer(scriptpath, cfg): # set up and spawn the process killer killscript = cfg.get_killscript_path(scriptpath) ProcessKiller(killscript, cfg.killprocname, cfg.killproctimeout).go() logger.debug("Process killer started: %s %s %d", killscript, cfg.killprocname, cfg.killproctimeout)