First page Back Continue Last page Overview Graphics

Unit tests


Notes:

query = "get(a/@href)/head/title"
t = parse_it_baby(toks(query))
result = webpath(t, ctxt)
# this branches out and fetches both hrefs
self.assertEquals(len(result), 2)
self.assertEquals(result[0].nodeName, "title")
self.assertEquals(result[1].nodeName, "title")
# these are titles from different documents, right?
self.assert_(result[0].firstChild.nodeValue != result[1].firstChild.nodeValue)