Пример #1
0
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
Пример #2
0
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
Пример #3
0
 def setUp(self):
     self.pk = ProcessKiller(*tuple('abc'))
Пример #4
0
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)
Пример #5
0
 def setUp(self):
     self.pk = ProcessKiller(*tuple('abc'))