MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_end_document

Method test_end_document

Lib/test/test_pulldom.py:151–164  ·  view source on GitHub ↗

PullDOM does not receive "end-document" events.

(self)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

nextFunction · 0.85
parseStringMethod · 0.45
assertEqualMethod · 0.45
failMethod · 0.45

Tested by

no test coverage detected