Exemplo n.º 1
0
 def test_xmlEval_mixed (self) :
     sourceRoot = et.fromstring(xml_child_source)
     queryRoot = et.fromstring("<Team><Cooly><Amber></Amber></Cooly><Dragon></Dragon></Team>")
     result = xmlEval(sourceRoot, queryRoot)
     self.assert_(result == [1, 7])
Exemplo n.º 2
0
 def test_xmlEval_sphere (self) :
     sourceRoot = et.fromstring(xml_child_source)
     queryRoot = et.fromstring(xml_child_query)
     result = xmlEval(sourceRoot, queryRoot)
     self.assert_(result == [2, 2, 7])
Exemplo n.º 3
0
 def test_xmlEval_easy (self) :
     sourceRoot = et.fromstring(xml_easy)
     queryRoot = et.fromstring("<Team></Team>")
     result = xmlEval(sourceRoot, queryRoot)
     self.assert_(result == [1, 1])
Exemplo n.º 4
0
 def test_xmlEval_mixed(self):
     sourceRoot = et.fromstring(xml_child_source)
     queryRoot = et.fromstring(
         "<Team><Cooly><Amber></Amber></Cooly><Dragon></Dragon></Team>")
     result = xmlEval(sourceRoot, queryRoot)
     self.assert_(result == [1, 7])
Exemplo n.º 5
0
 def test_xmlEval_sphere(self):
     sourceRoot = et.fromstring(xml_child_source)
     queryRoot = et.fromstring(xml_child_query)
     result = xmlEval(sourceRoot, queryRoot)
     self.assert_(result == [2, 2, 7])
Exemplo n.º 6
0
 def test_xmlEval_easy(self):
     sourceRoot = et.fromstring(xml_easy)
     queryRoot = et.fromstring("<Team></Team>")
     result = xmlEval(sourceRoot, queryRoot)
     self.assert_(result == [1, 1])