'If the lock is initially held but is released while an attempt
is made to acquire it, the lock attempt fails and
L{FilesystemLock.lock} returns C{False}.'

def test_lockReleasedDuringAcquireReadlink(self):

    def fakeReadlink(name):
        raise IOError(errno.EACCES, None)
    self.patch(lockfile, 'readlink', fakeReadlink)
    lockf = self.mktemp()
    lock = lockfile.FilesystemLock(lockf)
    lockfile.symlink(str(43125), lockf)
    self.assertFalse(lock.lock())
    self.assertFalse(lock.locked)
