code: def test_compute_backslash_indent(self):
      eq = self.assertEqual
      p = self.parser
      setcode = p.set_code
      indent = p.compute_backslash_indent
  
      # Must be C_BACKSLASH continuation type.
      errors = (
          ("def function1(self, a, b\\\n"),  # Bracket.
          ('    """ (\\\n'),  # Docstring.
          ("a = #\\\n"),  # Inline comment.
      )
      for string in errors:
          with self.subTest(string=string):
              setcode(string)
              with self.assertRaises(AssertionError):
                  indent()
  
      TestInfo = namedtuple("TestInfo", ("string", "spaces"))
      tests = (
          TestInfo("a = (1 + 2) - 5 *\\\n", 4),
          TestInfo("a = 1 + 2 - 5 *\\\n", 4),
          TestInfo("    a = 1 + 2 - 5 *\\\n", 8),
          TestInfo('  a = "spam"\\\n', 6),
          TestInfo('  a = \\\n"a"\\\n', 4),
          TestInfo('  a = #\\\n"a"\\\n', 5),
          TestInfo("a == \\\n", 2),
          TestInfo("a != \\\n", 2),
          # Difference between containing = and those not.
          TestInfo("\\\n", 2),
          TestInfo("    \\\n", 6),
          TestInfo("\t\\\n", 6),
          TestInfo("a\\\n", 3),
          TestInfo("{}\\\n", 4),
          TestInfo("(1 + 2) - 5 *\\\n", 3),
      )
      for test in tests:
          with self.subTest(string=test.string):
              setcode(test.string)
              eq(indent(), test.spaces)
  
imports: from idlelib import pyparse
  import unittest
  from collections import namedtuple
label_desc: Use image node_id 12 for calling the PyParseTest obj's underlying member method code with example usage: obj.test_compute_backslash_indent() without return types