'L{lockfile.symlink} raises L{OSError} with C{errno} set to L{EIO} when
the underlying L{rename} call fails with L{EIO}.
Renaming a file on Windows may fail if the target of the rename is in
the process of being deleted (directory deletion appears not to be
atomic).'

def test_symlinkEIOWindows(self):

    name = self.mktemp()
    def fakeRename(src, dst):
        raise IOError(errno.EIO, None)
    self.patch(lockfile, 'rename', fakeRename)
    exc = self.assertRaises(IOError, lockfile.symlink, name, 'foo')
    self.assertEqual(exc.errno, errno.EIO)
