MCPcopy Index your code
hub / github.com/python/cpython / TestCharHandler

Class TestCharHandler

Lib/test/test_sax.py:1535–1546  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1533 self.test_harness.in_cdata = False
1534
1535 class TestCharHandler(ContentHandler):
1536 def __init__(self, test_harness, *args, **kwargs):
1537 super().__init__(*args, **kwargs)
1538 self.test_harness = test_harness
1539
1540 def characters(self, content):
1541 if content != '\n':
1542 h = self.test_harness
1543 t = h.specified_chars[h.char_index]
1544 h.assertEqual(t[0], content)
1545 h.assertEqual(t[1], h.in_cdata)
1546 h.char_index += 1
1547
1548 self.parser = create_parser()
1549 self.parser.setContentHandler(TestCharHandler(self))

Callers 1

test_handlersMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_handlersMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…