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

Method test_end_document

Lib/test/test_pulldom.py:148–161  ·  view source on GitHub ↗

PullDOM does not receive "end-document" events.

(self)

Source from the content-addressed store, hash-verified

146
147 @unittest.expectedFailure
148 def test_end_document(self):
149 """PullDOM does not receive "end-document" events."""
150 items = pulldom.parseString(SMALL_SAMPLE)
151 # Read all of the nodes up to and including </html>:
152 for evt, node in items:
153 if evt == pulldom.END_ELEMENT and node.tagName == "html":
154 break
155 try:
156 # Assert that the next node is END_DOCUMENT:
157 evt, node = next(items)
158 self.assertEqual(pulldom.END_DOCUMENT, evt)
159 except StopIteration:
160 self.fail(
161 "Ran out of events, but should have received END_DOCUMENT")
162
163 def test_external_ges_default(self):
164 parser = pulldom.parseString(SMALL_SAMPLE)

Callers

nothing calls this directly

Calls 3

parseStringMethod · 0.45
assertEqualMethod · 0.45
failMethod · 0.45

Tested by

no test coverage detected