'When used as a context manager, a L{PIDFile} will raise
L{AlreadyRunningError} if the there is already a running process with
the contained PID.'

@ifPlatformSupported
def test_contextManagerAlreadyRunning(self):

    pidFile = PIDFile(DummyFilePath())
    pidFile._write(1337)
    def kill(pid, signal):
        return
    self.patch(_pidfile, 'kill', kill)
    self.assertTrue(pidFile.isRunning())
    self.assertRaises(AlreadyRunningError, pidFile.__enter__)
