def test_parseFileAndReport(self): """ L{tree.parseFileAndReport} parses the contents of the filename passed to it and returns the corresponding DOM. """ path = FilePath(self.mktemp()) path.setContent('<foo bar="baz">hello</foo>\n') document = tree.parseFileAndReport(path.path) self.assertXMLEqual(document.toxml(), '<?xml version="1.0" ?><foo bar="baz">hello</foo>')
def test_parseFileAndReport(self): """ L{tree.parseFileAndReport} parses the contents of the filename passed to it and returns the corresponding DOM. """ path = FilePath(self.mktemp()) path.setContent('<foo bar="baz">hello</foo>\n') document = tree.parseFileAndReport(path.path) self.assertXMLEqual( document.toxml(), '<?xml version="1.0" ?><foo bar="baz">hello</foo>')
def _parseTest(self, xml): path = FilePath(self.mktemp()) path.setContent(xml) return tree.parseFileAndReport(path.path)
def doFile(file, checker): doc = tree.parseFileAndReport(file) if doc: checker.check(doc, file)
def doFile(file, checker): dom = tree.parseFileAndReport(file) if dom: checker.check(dom, file)