code: def test_nested_class():
      """Test parsing of a class."""
      parser = Parser()
      code = CodeSnippet(
          """\
          class OuterClass(object):
              '   an outer docstring'
              class InnerClass(object):
                  "An inner docstring."
      """
      )
      module = parser.parse(code, "file_path")
  
      (outer_class,) = module.children
      assert outer_class.name == "OuterClass"
      assert outer_class.decorators == []
      assert outer_class.docstring == "'   an outer docstring'"
      assert outer_class.kind == "class"
      assert outer_class.parent == module
      assert outer_class.start == 1
      assert outer_class.end == 4
      assert outer_class.error_lineno == 2
      assert outer_class.source == code.getvalue()
      assert outer_class.is_public
      assert str(outer_class) == "in public class `OuterClass`"
  
      (inner_class,) = outer_class.children
      assert inner_class.name == "InnerClass"
      assert inner_class.decorators == []
      assert inner_class.children == []
      assert inner_class.docstring == '"An inner docstring."'
      assert inner_class.kind == "class"
      assert inner_class.parent == outer_class
      assert inner_class.start == 3
      assert inner_class.end == 4
      assert inner_class.error_lineno == 4
      assert textwrap.dedent(inner_class.source) == textwrap.dedent(
          """\
          class InnerClass(object):
              "An inner docstring."
      """
      )
      assert inner_class.is_public
      assert str(inner_class) == "in public nested class `InnerClass`"
  
imports: import io
  import sys
  import pytest
  import textwrap
  from pathlib import Path
  from pydocstyle.parser import Parser, ParseError
label_desc: Use image node_id 12 for calling a global function with example usage: test_nested_class() without return types