'If L{kill} raises an exception other than L{OSError} with errno set to
C{ESRCH}, the exception is passed up to the caller of
L{FilesystemLock.lock}.'

def test_killError(self):

    def fakeKill(pid, signal):
        raise OSError(errno.EPERM, None)
    self.patch(lockfile, 'kill', fakeKill)
    lockf = self.mktemp()
    lockfile.symlink(str(43125), lockf)
    lock = lockfile.FilesystemLock(lockf)
    exc = self.assertRaises(OSError, lock.lock)
    self.assertEqual(exc.errno, errno.EPERM)
    self.assertFalse(lock.locked)
