예제 #1
0
    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>')
예제 #2
0
    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>')
예제 #3
0
파일: test_lore.py 프로젝트: 0004c/VTK
 def _parseTest(self, xml):
     path = FilePath(self.mktemp())
     path.setContent(xml)
     return tree.parseFileAndReport(path.path)
예제 #4
0
def doFile(file, checker):
    doc = tree.parseFileAndReport(file)
    if doc:
        checker.check(doc, file)
예제 #5
0
def doFile(file, checker):
    dom = tree.parseFileAndReport(file)
    if dom:
        checker.check(dom, file)
예제 #6
0
 def _parseTest(self, xml):
     path = FilePath(self.mktemp())
     path.setContent(xml)
     return tree.parseFileAndReport(path.path)