def test_symlinkEEXIST(self):
        """
        L{lockfile.symlink} raises L{OSError} with C{errno} set to L{EEXIST}
        when an attempt is made to create a symlink which already exists.
        """
        name = self.mktemp()
        lockfile.symlink('foo', name)
        exc = self.assertRaises(OSError, lockfile.symlink, 'foo', name)
        self.assertEqual(exc.errno, errno.EEXIST)

        L{lockfile.symlink} raises L{OSError} with C{errno} set to L{EEXIST}
        when an attempt is made to create a symlink which already exists.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_lockfile.py