def test_list_living_single_us31(self): dict_indi, dict_fam = parse_gedcom(PATH) indi_list = build_individual(dict_indi) list_result = list_living_single_us31(indi_list) self.assertEqual(list_result, [ '014I03', '014I04', '014I05', '014I06', '014I07', '014I08', '031I03' ])
def test_US03(self): path = "C:\\project05\\test.ged" m, n = parse_gedcom(path) with patch('builtins.print') as mocked_print: birth_b_death_us03(build_individual(m)) mocked_print.assert_called_with( "Error: INDIVITUAL: US03 birth before death:line 5 and 9: I01: 5 JUL 1950 isn't before 31 DEC 1949" )
def main(): path = "" while len(path) == 0: path = input("Please enter your GEDCOM file path:\n") dict_indi, dict_fam = parse_gedcom(path) indi_list = build_individual(dict_indi) fam_list = build_family(dict_fam, indi_list) print(individual_table(indi_list)) family_table(fam_list) verification(indi_list, fam_list) output_errors_indi(indi_list) output_errors_fam(fam_list)
def test_include_individual_ages_us27(self): dict_indi, dict_fam = parse_gedcom(PATH) indi_list = build_individual(dict_indi) tb = individual_table(indi_list) l_age = [] for row in tb: row.border = False row.header = False l_age.append(row.get_string(fields=["Age"]).strip()) self.assertEqual(tb.field_names, ['ID', 'Name', 'Gender', 'Birthday', 'Alive', 'Death', 'Child', 'Spouse', 'Age']) self.assertEqual(l_age, ['death age: 0', '69', '51', '51', '51', '51', '51', '51', 'death age: 283', '69', '51', '-2', '25', '21', 'death age: 21', '47', '45', '22', '19', '17'])
def build_individual_list(path): return build_individual(parse_gedcom(path)[0])
def build_family_list(path): result = parse_gedcom(path)[1] return build_family(result, build_individual_list(path))
def test_List_upcoming_birthdays_us38(self): dict_indi, dict_fam = parse_gedcom(PATH) indi_list = build_individual(dict_indi) list_result = list_birthday_recent(indi_list) self.assertEqual(list_result, ['038I02', '038I05'])
def main(): path = "" while len(path) == 0: path = input("Please enter your GEDCOM file path:\n") parse_gedcom(path)