'L{lockfile.readlink} raises L{OSError} with C{errno} set to L{EACCES}
on Windows when the underlying file open attempt fails with C{EACCES}.
Opening a file on Windows may fail if the path is inside a directory
which is in the process of being deleted (directory deletion appears
not to be atomic).'

def test_readlinkEACCESWindows(self):

    name = self.mktemp()
    def fakeOpen(path, mode):
        raise IOError(errno.EACCES, None)
    self.patch(lockfile, '_open', fakeOpen)
    exc = self.assertRaises(IOError, lockfile.readlink, name)
    self.assertEqual(exc.errno, errno.EACCES)
