def test_find_recurse_2 (self): test_indices = {} build_index(test_xml_2[0]['xml'], 1, test_indices, "three") find_recurse(test_xml_2[0]['search'], test_indices) self.assert_(test_indices.keys() == [3]) # Finds the pattern at index 3
def test_find_recurse_3 (self): test_indices = {} build_index(test_xml_3[0]['xml'], 1, test_indices, "one") find_recurse(test_xml_3[0]['search'], test_indices) self.assert_(test_indices.keys() == [8, 2]) # Finds the pattern at indices 8 and 2
def test_find_recurse_1 (self): test_indices = {} build_index(test_xml_1[0]['xml'], 1, test_indices, "ten") find_recurse(test_xml_1[0]['search'], test_indices) self.assert_(test_indices == {})