def testPidFileExistsInvalid___clean_prior(self):
        # write invalid pid file
        filename = self._get_pidfile()
        open(filename, 'w', 0).write('a#*)#&@!(b\n')

        self.task._loaded = True
        self.assertTrue(self.task._clean_prior())
        self.assertTrue(os.path.isfile(filename))  # didn't remove
Provision protocol with the dedicated logger
dataset/ETHPy150Open xtrementl/focus/tests/unit/test_task.py/TestTask.testPidFileExistsInvalid___clean_prior--crossover with--dataset/ETHPy150Open jookies/jasmin/jasmin/protocols/smpp/factory.py/SMPPServerFactory.buildProtocol