コード例 #1
0
ファイル: test_lore.py プロジェクト: svpcom/twisted-cdeferred
    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
ファイル: test_lore.py プロジェクト: 309972460/software
    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
ファイル: lint.py プロジェクト: levanhong05/MeshMagic
def doFile(file, checker):
    doc = tree.parseFileAndReport(file)
    if doc:
        checker.check(doc, file)
コード例 #5
0
ファイル: lint.py プロジェクト: AnthonyNystrom/YoGoMee
def doFile(file, checker):
    dom = tree.parseFileAndReport(file)
    if dom:
        checker.check(dom, file)
コード例 #6
0
ファイル: test_lore.py プロジェクト: 309972460/software
 def _parseTest(self, xml):
     path = FilePath(self.mktemp())
     path.setContent(xml)
     return tree.parseFileAndReport(path.path)