def test_get_grandparents(self): test_data = test_reader.get_family_tree_tests(tree_version,'get_grandparents') for test in test_data: expected_result = test_data[test] test_result = family_tree.get_grandparent(test) self.assertEqual(test_result,expected_result,msg='{} failure'.format(input))
def test_get_people_without_children(self): expected_result = test_reader.get_family_tree_tests(tree_version,'get_people_without_children') test_result = family_tree.get_people_without_children() self.assertEqual(test_result,expected_result,msg='{} failure'.format('No children test'))
def test_get_person_with_largest_number_of_grandchildren(self): expected_result = test_reader.get_family_tree_tests(tree_version,'get_person_with_most_grandchildren') test_result = family_tree.get_person_with_largest_number_of_grandchildren() self.assertEqual(test_result,expected_result,msg='{} failure'.format('Most grandchildren test'))
def test_get_people_without_siblings(self): expected_result = test_reader.get_family_tree_tests(tree_version, "get_people_without_siblings") test_result = family_tree.get_people_without_siblings() self.assertEqual(test_result, expected_result, msg="{} failure".format("No sibling test"))