コード例 #1
0
ファイル: test_us31.py プロジェクト: capWailing/SSW555AP2020s
 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'
     ])
コード例 #2
0
    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"
            )
コード例 #3
0
ファイル: startup.py プロジェクト: capWailing/SSW555AP2020s
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)
コード例 #4
0
ファイル: test_us27.py プロジェクト: capWailing/SSW555AP2020s
    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'])
コード例 #5
0
def build_individual_list(path):
    return build_individual(parse_gedcom(path)[0])
コード例 #6
0
def build_family_list(path):
    result = parse_gedcom(path)[1]
    return build_family(result, build_individual_list(path))
コード例 #7
0
 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'])
コード例 #8
0
def main():
    path = ""
    while len(path) == 0:
        path = input("Please enter your GEDCOM file path:\n")

    parse_gedcom(path)