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

Class SAX2DOMExerciser

Lib/test/test_pulldom.py:269–283  ·  view source on GitHub ↗

The same as SAXExerciser, but without the processing instruction and comment before the root element, because S2D can"t handle it

Source from the content-addressed store, hash-verified

267
268
269class SAX2DOMExerciser(SAXExerciser):
270 """The same as SAXExerciser, but without the processing instruction and
271 comment before the root element, because S2D can"t handle it"""
272
273 def parse(self, _):
274 h = self._handler
275 h.startDocument()
276 h.startElement("html", AttributesImpl({}))
277 h.comment("a comment")
278 h.processingInstruction("target", "data")
279 h.startElement("p", AttributesImpl({"class": "paraclass"}))
280 h.characters("text")
281 h.endElement("p")
282 h.endElement("html")
283 h.endDocument()
284
285
286class SAX2DOMTestHelper(pulldom.DOMEventStream):

Callers 1

test_thorough_sax2domMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_thorough_sax2domMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…