def test_separate_singles(self): test_list = [] r = StringIO.StringIO(singles_string) tree = xml_read(r) xml_separate(tree, test_list) self.assert_(test_list[0].tag == 'First') self.assert_(test_list[1].tag == 'Last')
def test_separate_pretty(self): test_list = [] r = StringIO.StringIO(pretty_print_string) tree = xml_read(r) xml_separate(tree, test_list) self.assert_(test_list[0].tag == 'This') self.assert_(test_list[1].tag == 'Query')
def test_separate_default(self): test_list = [] r = StringIO.StringIO(default_string) tree = xml_read(r) xml_separate(tree, test_list) self.assert_(test_list[0].tag == 'THU') self.assert_(test_list[1].tag == 'Team')
def test_eval_no_result(self): solve_list = [0] test_list = [] r = StringIO.StringIO(pretty_print_string) tree = xml_read(r) xml_separate(tree, test_list) xml_eval(test_list, solve_list) self.assert_(solve_list[0] == 0)
def test_eval_default_2(self): solve_list = [0] test_list = [] r = StringIO.StringIO(default_string2) tree = xml_read(r) xml_separate(tree, test_list) xml_eval(test_list, solve_list) self.assert_(solve_list[0] == 1) self.assert_(solve_list[1] == 5)
def test_only_one(self): test_list = [] r = StringIO.StringIO(easy_string) tree = xml_read(r) xml_separate(tree, test_list) self.assert_(test_list[0].tag == 'FIRST')