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
task._clean_prior: invalid pid file exists, do nothing.
dataset/ETHPy150Open xtrementl/focus/tests/unit/test_task.py/TestTask.testPidFileExistsInvalid___clean_prior