61tree=self.parse('<a><b/></a>') 62self.assertEqual([], 63tree.xpath('/a/c')) 64# this seems to pass a different code path, also should return nothing 65self.assertEqual([], 66tree.xpath('/a/c/text()'))

385tree=self.parse('<root><a/><b><c/></b></root>')386387check_call={}388defcheck_context(ctxt,nodes):389self.assertEqual(len(nodes),1)390tag=nodes[0].tag391# empty during the "b" call, a "b" during the "c" call392check_call[tag]=ctxt.eval_context.get("b")393ctxt.eval_context[tag]=tag394returnTrue

405tree=self.parse('<root><a/><b><c/></b></root>')406407check_call={}408defcheck_context(ctxt):409check_call["done"]=True410# context must be empty for each new evaluation411self.assertEqual(len(ctxt.eval_context),0)412ctxt.eval_context["test"]=True413returnTrue

571"Tests for the EXSLT support in XPath (requires libxslt 1.1.25+)"572573NSMAP=dict(574date="http://exslt.org/dates-and-times",575math="http://exslt.org/math",576set="http://exslt.org/sets",577str="http://exslt.org/strings",578)579