예제 #1
0
 def test_xstr_2 (self) : 
     tree = ET.ElementTree(file = "WC2.xml")
     root = tree.getroot()
     crises = root.findall("crisis")
     time = xstr(crises[0].find("info").find("time").find("time"))
     self.assert_(time == None)
예제 #2
0
 def test_xstr_3 (self) : 
     tree = ET.ElementTree(file = "WC2.xml")
     root = tree.getroot()
     crises = root.findall("crisis")
     day = xstr(crises[0].find("info").find("time").find("day"))
     self.assert_(day == "15")
예제 #3
0
 def test_xstr_1 (self) : 
     tree = ET.ElementTree(file = "WC2.xml")
     root = tree.getroot()
     crises = root.findall("crisis")
     type_ = xstr(crises[0].find("info").find("type"))
     self.assert_(type_ == "Civil War")