Minimal test of DOMEventStream.parse()
(self)
| 25 | class PullDOMTestCase(unittest.TestCase): |
| 26 | |
| 27 | def test_parse(self): |
| 28 | """Minimal test of DOMEventStream.parse()""" |
| 29 | |
| 30 | # This just tests that parsing from a stream works. Actual parser |
| 31 | # semantics are tested using parseString with a more focused XML |
| 32 | # fragment. |
| 33 | |
| 34 | # Test with a filename: |
| 35 | handler = pulldom.parse(tstfile) |
| 36 | self.addCleanup(handler.stream.close) |
| 37 | list(handler) |
| 38 | |
| 39 | # Test with a file object: |
| 40 | with open(tstfile, "rb") as fin: |
| 41 | list(pulldom.parse(fin)) |
| 42 | |
| 43 | def test_parse_semantics(self): |
| 44 | """Test DOMEventStream parsing semantics.""" |
nothing calls this directly
no test coverage detected