Exemplo n.º 1
0
def parse(path, save):
    g = Gedcom(path, SUPPORT_TAGS)
    click.echo("parsing...")
    g.parse()
    g.run_check()
    if save:
        click.echo("saving to file")
    return
Exemplo n.º 2
0
###
###Making the GEDCOM files
###
# right.ged with 5 recently deceased people in the past 30 days
# 7 recently deceased people's relatives. recently deceased in past 30 days
# 6 people with upcoming birthdays in 30 days
# 4 people with upcoming anniversaries in 30 days(2 couples)
# errors occur on line 20 and 25
# one or two date entries with missing information( missing day or missing month)

#wrong.ged with invalid dates, e.g(2/30/2020)
#error on line 15

G1 = Gedcom('../testing_files/mock-family.ged', SUPPORT_TAGS)
G1.parse()

# G2 = Gedcom('../testing_files/wrong.ged', SUPPORT_TAGS)


class sprint3Test(unittest.TestCase):

    #list all people in a GEDCOM file who died in the last 30 days
    def test_ListRecentDeaths(self):

        self.assertEqual(G1.listRecentDeaths().len(), 5)
        self.assertNotEqual(G1.listRecentDeaths().len(), 3)

        #manually input deceased people and append to the array
        deceasedProple = []
        for indi in deceasedProple: