code: def test_class_alias(app):
      def autodoc_process_docstring(*args):
          """A handler always raises an error.
          This confirms this handler is never called for class aliases.
          """
          raise
  
      app.connect(
          "autodoc-process-docstring", autodoc_process_docstring
      )
      actual = do_autodoc(app, "class", "target.classes.Alias")
      assert list(actual) == [
          "",
          ".. py:attribute:: Alias",
          "   :module: target.classes",
          "",
          "   alias of :py:class:`~target.classes.Foo`",
      ]
  
imports: from __future__ import annotations
  import typing
  from typing import Union
  import pytest
  from tests.test_extensions.test_ext_autodoc import do_autodoc
label_desc: Use image node_id 15 for calling a global function with example usage: test_class_alias(app) without return types