def testNonZero(): dom = parse(tstfile) confirm(dom) # should not be zero dom.appendChild(dom.createComment("foo")) confirm(not dom.childNodes[-1].childNodes) dom.unlink()
def testNonZero(): dom = parse(tstfile) confirm(dom)# should not be zero dom.appendChild(dom.createComment("foo")) confirm(not dom.childNodes[-1].childNodes) dom.unlink()
def testAppendChild(): dom = parse(tstfile) dom.documentElement.appendChild(dom.createComment(u"Hello")) confirm(dom.documentElement.childNodes[-1].nodeName == "#comment") confirm(dom.documentElement.childNodes[-1].data == "Hello") dom.unlink()