def test_refine_2(self): x,y = xml_refine(['<Cooly><Amber></Amber></Cooly>', '<Dog><Cat></Cat></Dog>']) self.assert_(x == ['Cooly', 'Amber', '/Amber', '/Cooly']) self.assert_(y == ['Dog', 'Cat', '/Cat', '/Dog'])
def test_refine_3(self): x,y = xml_refine(['<THU>', '<Team>', '<ACRush></ACRush>', '<Jelly></Jelly>', '<Cooly></Cooly>', '</Team>', '<JiaJia>', '<Team>', '<Ahyangyi></Ahyangyi>', '<Dragon></Dragon>', '<Cooly><Amber></Amber></Cooly>', '</Team>', '</JiaJia>', '</THU><Team><Cooly></Cooly></Team>']) self.assert_(x == ['THU', 'Team', 'ACRush', '/ACRush', 'Jelly', '/Jelly', 'Cooly', '/Cooly', '/Team', 'JiaJia', 'Team', 'Ahyangyi', '/Ahyangyi', 'Dragon', '/Dragon', 'Cooly', 'Amber', '/Amber', '/Cooly', '/Team', '/JiaJia', '/THU']) self.assert_(y == ['Team', 'Cooly', '/Cooly', '/Team'])
def test_refine_1(self): x,y = xml_refine(['<THU>', '</THU>', '<Team>']) self.assert_(x == ['THU', '/THU']) self.assert_(y == ['Team'])