示例#1
0
	def test_xmlSolve_noAnswer(self):
		r = StringIO("<THU><Team><ACRush></ACRush><Jelly></Jelly><Cooly></Cooly></Team><JiaJia><Team><Ahyangyi></Ahyangyi><Dragon></Dragon><Cooly><Amber></Amber></Cooly></Team></JiaJia></THU><Jesse></Jesse>")
		w = StringIO()
		XML.xmlSolve(r,w)
		self.assertTrue(w.getvalue() == "0\n")
def main():
    XML.xmlSolve(sys.stdin, sys.stdout)
示例#3
0
	def test_xmlSolve_multipleChildren(self):
		r = StringIO("<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><Jelly></Jelly></Team>")
		w = StringIO()
		XML.xmlSolve(r,w)
		self.assertTrue(w.getvalue() == "1\n2\n")