def testPidFileExistValid___clean_prior(self):
        # write example pid file
        filename = self._get_pidfile()
        open(filename, 'w', 0).write('999999\n')

        self.task._loaded = True
        self.assertTrue(self.task._clean_prior())
        self.assertFalse(os.path.isfile(filename))  # was removed
:param VolumeService volume_service: An already-started volume service.
dataset/ETHPy150Open xtrementl/focus/tests/unit/test_task.py/TestTask.testPidFileExistValid___clean_prior--crossover with--dataset/ETHPy150Open ClusterHQ/flocker/flocker/volume/service.py/ICommandLineVolumeScript.main