Beispiel #1
0
 def test_US_36(self):
     file_name = 'US_35_36.ged'
     file_path = os.path.join(current_directory, 'gedcom_test_files',
                              file_name)
     individuals, families, tag_positions = parse_gedcom(
         file_path, 'outputs/test_output.txt')
     self.assertEqual(recent_deaths(individuals, tag_positions), [])
Beispiel #2
0
 def test_US_33(self):
     file_name = "US_26_33.ged"
     file_path = os.path.join(current_directory, 'gedcom_test_files',
                              file_name)
     individuals, families, tag_positions = parse_gedcom(
         file_path, 'outputs/test_output.txt')
     self.assertEqual(list_orphans(individuals, families, tag_positions),
                      ["ANOMALY: INDIVIDUAL: US33, line {40},is orphans."])
Beispiel #3
0
 def test_US_29(self):
     file_name = 'US_38_39.ged'
     file_path = os.path.join(current_directory, 'gedcom_test_files',
                              file_name)
     individuals, families, tag_positions = parse_gedcom(
         file_path, 'outputs/test_output.txt')
     self.assertEqual(US_29(individuals, families, tag_positions), [
         "ANOMALY: INDIVIDUAL: US29: line {73} , The deceased individual is : Meet Shah"
     ])
Beispiel #4
0
 def test_US_39(self):
     file_name = 'US_38_39.ged'
     file_path = os.path.join(current_directory, 'gedcom_test_files',
                              file_name)
     individuals, families, tag_positions = parse_gedcom(
         file_path, 'outputs/test_output.txt')
     self.assertEqual(US_39(individuals, families, tag_positions), [
         "ANOMALY: FAMILY: US39: line {35} and {24}, The upcoming anniversaries in next 30 days is of Dhiru Shah and Gari Jain on May 07 2000"
     ])
Beispiel #5
0
 def test_US_03(self):
     file_name = 'US_03_US_08.ged'
     file_path = os.path.join(current_directory, 'gedcom_test_files',
                              file_name)
     individuals, families, tag_positions = parse_gedcom(
         file_path, 'outputs/test_output.txt')
     self.assertEqual(check_BirthBeforeDeath(individuals, tag_positions), [
         'ANOMALY: Individual: US03, line {64, 66},Parth Shah died before birth'
     ])
Beispiel #6
0
 def test_US_23(self):
     file_name = 'US_23.ged'
     file_path = os.path.join(current_directory, 'gedcom_test_files',
                              file_name)
     individuals, families, tag_positions = parse_gedcom(
         file_path, 'outputs/test_output.txt')
     self.assertEqual(unique_name_and_birth(individuals, tag_positions), [
         'ANOMALY: INDIVIDUAL: US23, line {53, 15}, Hp Pate has similar name and birthdate.'
     ])
Beispiel #7
0
 def test_US_27(self):
     file_name = 'US_27.ged'
     file_path = os.path.join(current_directory, 'gedcom_test_files',
                              file_name)
     individuals, families, tag_positions = parse_gedcom(
         file_path, 'outputs/test_output.txt')
     self.assertEqual(
         includeindividualage(individuals, families, tag_positions),
         ['INDIVIDUAL: US27,Above Table shows individuals with their age'])
Beispiel #8
0
 def test_US_10(self):
     file_name = "US_09,US_10.ged"
     file_path = os.path.join(current_directory, 'gedcom_test_files',
                              file_name)
     individuals, families, tag_positions = parse_gedcom(
         file_path, 'outputs/test_output.txt')
     self.assertEqual(
         check_BirthofParents(individuals, families, tag_positions), [
             'ANOMALY: FAMILY: US10, line{30}, Sofia Milano Mother of child Isabella Milano is less than 14 years old'
         ])
Beispiel #9
0
 def test_US_26(self):
     file_name = "US_26_33.ged"
     file_path = os.path.join(current_directory, 'gedcom_test_files',
                              file_name)
     individuals, families, tag_positions = parse_gedcom(
         file_path, 'outputs/test_output.txt')
     self.assertEqual(
         corresponding_entries(individuals, families, tag_positions), [
             "ANOMALY: US26,either line {83} does not have corresponding entry"
         ])
Beispiel #10
0
 def US_34(self):
     file_name = 'US_34_37.ged'
     file_path = os.path.join(current_directory, 'gedcom_test_files',
                              file_name)
     individuals, families, tag_positions = parse_gedcom(
         file_path, 'outputs/test_output.txt')
     self.assertEqual(US_34(individuals, families, tag_positions), [
         "ANOMALY: FAMILY: US34: line {37} and {24}, Dhiru Shah and Gari Jain are the couples who were married when the older spouse was more than twice as old as the younger spouse.",
         "ANOMALY: FAMILY: US34: line {104} and {95}, Prem Shah and Riya Patel are the couples who were married when the older spouse was more than twice as old as the younger spouse."
     ])
Beispiel #11
0
 def test_US_24(self):
     file_name = 'US_24.ged'
     file_path = os.path.join(current_directory, 'gedcom_test_files',
                              file_name)
     individuals, families, tag_positions = parse_gedcom(
         file_path, 'outputs/test_output.txt')
     self.assertEqual(
         unique_family_by_spouse(individuals, families, tag_positions), [
             "ANAMOLY: FAMILY: US24, line {88, 89, 87}, Family contain same husband (Raj Patel), same wife (Jaya Patel) and same marraige date (1990-03-04 00:00:00) as another family."
         ])
Beispiel #12
0
 def test_US_07(self):
     file_name = 'US_07.ged'
     file_path = os.path.join(current_directory, 'gedcom_test_files',
                              file_name)
     individuals, families, tag_positions = parse_gedcom(
         file_path, 'outputs/test_output.txt')
     self.assertEqual(age_is_legal(individuals, families, tag_positions), [
         'ANAMOLY: INDIVIDUAL: US07, line {20}, Raj Patel was over 150 years old when he was dead.',
         "ANAMOLY: INDIVIDUAL: US07, line {42}, Kevin Patel is over 150 years old and alive."
     ])
Beispiel #13
0
 def test_US_38(self):
     file_name = 'US_38_39.ged'
     file_path = os.path.join(current_directory, 'gedcom_test_files',
                              file_name)
     individuals, families, tag_positions = parse_gedcom(
         file_path, 'outputs/test_output.txt')
     self.assertEqual(US_38(individuals, families, tag_positions), [
         "ANOMALY: INDIVIDUAL: US38, line {15}, The upcoming birthday in next 30 days is of Saddi Shah on May 09 2019",
         'ANOMALY: INDIVIDUAL: US38, line {35}, The upcoming birthday in next 30 days is of Dhiru Shah on May 11 1970'
     ])
Beispiel #14
0
 def test_US_14(self):
     file_name = "US_12,US_14.ged"
     file_path = os.path.join(current_directory, 'gedcom_test_files',
                              file_name)
     individuals, families, tag_positions = parse_gedcom(
         file_path, 'outputs/test_output.txt')
     self.assertEqual(
         check_MultipleBirths(individuals, families, tag_positions), [
             'ANOMALY: FAMILY: US14 @F13@ has more than 5 siblings born on same time'
         ])
Beispiel #15
0
    def test_US_22(self):
        file_name = 'US_22.ged'
        file_path = os.path.join(current_directory, 'gedcom_test_files',
                                 file_name)
        individuals, families, tag_positions, error = parse_gedcom(
            file_path, 'outputs/test_output.txt', True)

        self.assertEqual(error, [
            'ERROR US22, line 15, An Individual with ID @I1@ already exists!'
        ])
Beispiel #16
0
 def test_US_16(self):
     file_name = 'US_16.ged'
     file_path = os.path.join(current_directory, 'gedcom_test_files',
                              file_name)
     individuals, families, tag_positions = parse_gedcom(
         file_path, 'outputs/test_output.txt')
     self.assertEqual(
         check_last_names(individuals, families, tag_positions), [
             'ANOMALY: INDIVIDUAL: US16, line {29, 15}, Amit Shah last name is diffrent than Noah Millow last name'
         ])
Beispiel #17
0
 def test_US_02(self):
     file_name = 'US_01,US_02.ged'
     file_path = os.path.join(current_directory, 'gedcom_test_files',
                              file_name)
     individuals, families, tag_positions = parse_gedcom(
         file_path, 'outputs/test_output.txt')
     self.assertEqual(
         check_BirthBeforeMarriage(individuals, families, tag_positions), [
             'ANOMALY: FAMILY: US02, line {256, 91},Roberto Milano Married before birth'
         ])
Beispiel #18
0
    def test_US_31(self):
        file_name = 'US_31.ged'
        file_path = os.path.join(current_directory, 'gedcom_test_files',
                                 file_name)
        individuals, families, tag_positions = parse_gedcom(
            file_path, 'outputs/test_output.txt')

        self.assertEqual(
            listLivingSingle(individuals, families, tag_positions),
            ['Kevin Millow is over 30 years and still not married'])
Beispiel #19
0
    def test_US_15(self):
        file_name = 'US_15_False.ged'
        file_path = os.path.join(current_directory, 'gedcom_test_files',
                                 file_name)
        individuals, families, tag_positions = parse_gedcom(
            file_path, 'outputs/test_output.txt')

        file_name = 'US_15_True.ged'
        file_path = os.path.join(current_directory, 'gedcom_test_files',
                                 file_name)
        individuals2, families2, tag_positions2 = parse_gedcom(
            file_path, 'outputs/test_output.txt')

        self.assertEqual(
            check_sibling_counts(individuals, families, tag_positions), [])
        self.assertEqual(
            check_sibling_counts(individuals2, families2, tag_positions2), [
                'ANOMALY: FAMILY: US15, line [27, 31, 35, 39, 43, 47, 51, 55, 59, 63, 67, 71, 75, 79, 83, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101] Family @F1@ has more than 14 siblings!'
            ])
Beispiel #20
0
 def test_US_30(self):
     file_name = 'US_27.ged'
     file_path = os.path.join(current_directory, 'gedcom_test_files',
                              file_name)
     individuals, families, tag_positions = parse_gedcom(
         file_path, 'outputs/test_output.txt')
     self.assertEqual(
         listLivingMarried(individuals, families, tag_positions), [
             'INDIVIDUAL: US30,Above Table shows individuals who are married and alive'
         ])
Beispiel #21
0
 def test_US_21(self):
     file_name = 'US_21.ged'
     file_path = os.path.join(current_directory, 'gedcom_test_files',
                              file_name)
     individuals, families, tag_positions = parse_gedcom(
         file_path, 'outputs/test_output.txt')
     self.assertEqual(
         check_correct_gender(individuals, families, tag_positions), [
             'ANOMALY: INDIVIDUAL: US21, line {19}, Noah Millow has different gender than expected',
             'ANOMALY: INDIVIDUAL: US21, line {33}, Amit Millow has different gender than expected'
         ])
Beispiel #22
0
    def test_US_19(self):
        file_name = 'US_19.ged'
        file_path = os.path.join(current_directory, 'gedcom_test_files',
                                 file_name)
        individuals, families, tag_positions = parse_gedcom(
            file_path, 'outputs/test_output.txt')

        self.assertEqual(
            first_cousins_married(individuals, families, tag_positions), [
                'ANOMALY: FAMILY: US19, line {56, 50, 75, 76} Cousin 2 is married to his first cousin Cousin 1!'
            ])
Beispiel #23
0
    def test_US_18(self):
        file_name = 'US_17_18.ged'
        file_path = os.path.join(current_directory, 'gedcom_test_files',
                                 file_name)
        individuals, families, tag_positions = parse_gedcom(
            file_path, 'outputs/test_output.txt')

        self.assertEqual(
            marriages_to_siblings(individuals, families, tag_positions), [
                'ANOMALY: FAMILY: US18, line {36, 29, 30}, Brother and Daughter are siblings and married to each other!'
            ])
Beispiel #24
0
    def test_US_17(self):
        file_name = 'US_17_18.ged'
        file_path = os.path.join(current_directory, 'gedcom_test_files',
                                 file_name)
        individuals, families, tag_positions = parse_gedcom(
            file_path, 'outputs/test_output.txt')

        self.assertEqual(
            marriages_to_children(individuals, families, tag_positions), [
                'ANOMALY: FAMILY: US17, line {18, 19}, Father is married to their child(ren) @I3@!'
            ])
Beispiel #25
0
    def test_US_06(self):
        file_name = 'US_04_05_06.ged'
        file_path = os.path.join(current_directory, 'gedcom_test_files',
                                 file_name)
        individuals, families, tag_positions = parse_gedcom(
            file_path, 'outputs/test_output.txt')

        self.assertEqual(
            divorce_before_death(individuals, families, tag_positions), [
                'ANOMALY: INDIVIDUAL: US06, line {35, 20}, Chris Something was divorced after their death.'
            ])
Beispiel #26
0
    def test_US_25(self):
        file_name = 'US_25.ged'
        file_path = os.path.join(current_directory, 'gedcom_test_files',
                                 file_name)
        individuals, families, tag_positions = parse_gedcom(
            file_path, 'outputs/test_output.txt')

        self.assertEqual(US_25(individuals, families, tag_positions), [
            'ANOMALY: US25: line {69, 15}, There are multiple Hp Pate in the family.',
            'ANOMALY: US25: line {74, 20}, There are multiple people born on Jan 02 1970 in the family.'
        ])
Beispiel #27
0
 def test_US_32(self):
     file_name = 'US_32.ged'
     file_path = os.path.join(current_directory, 'gedcom_test_files',
                              file_name)
     individuals, families, tag_positions = parse_gedcom(
         file_path, 'outputs/test_output.txt')
     self.assertEqual(multiple_birth(
         individuals, families, tag_positions
     ), [
         "ANOMALY: FAMILY: US32, ['Amit Shah', 'Kevin Millow'] The two or more individuals were born at the same time"
     ])
Beispiel #28
0
 def US_37(self):
     file_name = 'US_37.ged'
     file_path = os.path.join(current_directory, 'gedcom_test_files',
                              file_name)
     individuals, families, tag_positions = parse_gedcom(
         file_path, 'outputs/test_output.txt')
     self.assertEqual(US_37(individuals, families, tag_positions), [
         "ANOMALY: FAMILY: US37: line {47} and {15}, Living Spouse: Dhruv Shah and Descendant: Saddi Shah .",
         "ANOMALY: FAMILY: US37: line {37} and {57}, Living Spouse: Dhiru Shah and Descendant: Praj Shah .",
         "ANOMALY: FAMILY: US37: line {95} and {37}, Living Spouse: Riya Patel and Descendant: Dhiru Shah ."
     ])
Beispiel #29
0
 def test_US_12(self):
     file_name = "US_12,US_14.ged"
     file_path = os.path.join(current_directory, 'gedcom_test_files',
                              file_name)
     individuals, families, tag_positions = parse_gedcom(
         file_path, 'outputs/test_output.txt')
     self.assertEqual(
         check_ParentsNotTooOld(individuals, families, tag_positions), [
             'ANOMALY: FAMILY: US12, line{94}, Roberto Milano Father of child Sofia Milano is elder by 80 or more years',
             'ANOMALY: FAMILY: US12, line{103}, Maria Ferrari Mother of child Sofia Milano is elder by 60 or more years'
         ])
Beispiel #30
0
    def test_US_11(self):
        file_name = 'US_11.ged'
        file_path = os.path.join(current_directory, 'gedcom_test_files',
                                 file_name)
        individuals, families, tag_positions = parse_gedcom(
            file_path, 'outputs/test_output.txt')

        # Arya and Noah ferris have both been married twice. Arya's partner passed
        # away so she is fine(in a monogamous marriage)! Noah should not be(bigamy).
        self.assertEqual(bigamy(individuals, families, tag_positions), [
            'ANOMALY: INDIVIDUAL: US11, line {22, 23}, Noah Ferris has more than 1 active marriages!'
        ])