def test_realpathCyclicalSymlink(self):
        """
        L{FilePath.realpath} raises L{filepath.LinkError} if the path is a
        symbolic link which is part of a cycle.
        """
        self.symlink(self.path.child(b"link1").path, self.path.child(b"link2").path)
        self.symlink(self.path.child(b"link2").path, self.path.child(b"link1").path)
        self.assertRaises(filepath.LinkError,
                          self.path.child(b"link2").realpath)

        L{FilePath.realpath} raises L{filepath.LinkError} if the path is a
        symbolic link which is part of a cycle.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_paths.py