Ensure SAX2DOM can parse from a stream.
(self)
| 303 | |
| 304 | @unittest.expectedFailure # TODO: RUSTPYTHON; read from stream io |
| 305 | def test_basic(self): |
| 306 | """Ensure SAX2DOM can parse from a stream.""" |
| 307 | with io.StringIO(SMALL_SAMPLE) as fin: |
| 308 | sd = SAX2DOMTestHelper(fin, xml.sax.make_parser(), |
| 309 | len(SMALL_SAMPLE)) |
| 310 | for evt, node in sd: |
| 311 | if evt == pulldom.START_ELEMENT and node.tagName == "html": |
| 312 | break |
| 313 | # Because the buffer is the same length as the XML, all the |
| 314 | # nodes should have been parsed and added: |
| 315 | self.assertGreater(len(node.childNodes), 0) |
| 316 | |
| 317 | def testSAX2DOM(self): |
| 318 | """Ensure SAX2DOM expands nodes as expected.""" |
nothing calls this directly
no test coverage detected