def test_xml_Eval2(self) : u = et.fromstring("<THU>\n<Team>\n<ACRush></ACRush>\n<Jelly></Jelly>\n<Cooly></Cooly>\n"\ + "</Team>\n<JiaJia>\n<Team>\n<Ahyangyi></Ahyangyi>\n<Dragon>"\ + "</Dragon>\n<Cooly><Amber></Amber></Cooly>\n</Team>\n</JiaJia>\n"\ + "</THU>") v = et.fromstring("<Team><Cooly></Cooly></Team>") result = xml_Eval(u,v) self.assertTrue(result == [2,2,7])
def test_xml_Eval3(self) : u = et.fromstring("<Team><Cooly></Cooly></Team>") v = et.fromstring("<Team></Team>") result = xml_Eval(u,v) self.assertTrue(result == [1,1])