code: def test_compute_bracket_indent(self):
      eq = self.assertEqual
      p = self.parser
      setcode = p.set_code
      indent = p.compute_bracket_indent
  
      TestInfo = namedtuple("TestInfo", ["string", "spaces"])
      tests = (
          TestInfo("def function1(self, a,\n", 14),
          # Characters after bracket.
          TestInfo("\n    def function1(self, a,\n", 18),
          TestInfo("\n\tdef function1(self, a,\n", 18),
          # No characters after bracket.
          TestInfo("\n    def function1(\n", 8),
          TestInfo("\n\tdef function1(\n", 8),
          TestInfo(
              "\n    def function1(  \n", 8
          ),  # Ignore extra spaces.
          TestInfo(
              '[\n"first item",\n  # Comment line\n    "next item",\n',
              0,
          ),
          TestInfo(
              '[\n  "first item",\n  # Comment line\n    "next item",\n',
              2,
          ),
          TestInfo(
              '["first item",\n  # Comment line\n    "next item",\n', 1
          ),
          TestInfo("(\n", 4),
          TestInfo("(a\n", 1),
      )
  
      # Must be C_BRACKET continuation type.
      setcode("def function1(self, a, b):\n")
      with self.assertRaises(AssertionError):
          indent()
  
      for test in tests:
          setcode(test.string)
          eq(indent(), test.spaces)
  
imports: from idlelib import pyparse
  import unittest
  from collections import namedtuple
label_desc: Use image node_id 11 for calling the PyParseTest obj's underlying member method code with example usage: obj.test_compute_bracket_indent() without return types