예제 #1
0
 def test_us21(self):
     with open("testfiles/test-us21.ged") as f:
         parsed = parse_ged(f.read().split('\n'))
         self.assertEqual(mi.us21(parsed), [
             'Anomaly US21: Gender of Alex /Jones/ (I01) does not match family role',
             'Anomaly US21: Gender of Lacy /jones/ (I07) does not match family role'
         ])
예제 #2
0
 def test_us34(self):
     with open("testfiles/test-us34.ged") as f:
         parsed = parse_ged(f.read().split('\n'))
         self.assertEqual(mi.us34_list(parsed), [
             'US34: List couples married with one spouse twice the age of the other:',
             ['Alex /Jones/ and Lacy /jones/ (F23)']
         ])
예제 #3
0
 def test_us29(self):
     with open("testfiles/test-us29.ged") as f:
         parsed = parse_ged(f.read().split('\n'))
         self.assertEqual(mi.us29_list(parsed), [
             'US29: List of deceased individuals:',
             ['Alex /Jones/ (I01)', 'Lacy /jones/ (I07)']
         ])
예제 #4
0
    def test_us03(self):
        self.assertEqual(mf.US03(
            ged.parse_ged(ged.read_ged("testfiles/test-us03.ged").split("\n"))
        ),
            ['Error US03: Users [ I01 ] have died before being born']

        )
예제 #5
0
 def test_us08(self):
     self.assertEqual(yl.us08(
         ged.parse_ged(ged.read_ged("testfiles/test-us08.ged").split("\n"))
     ),
         ["Anomaly US08: Dick /Smith/ (I19) was born before marriage of parents.",
          "Anomaly US08: Jane /Smith/ (I26) was born after more than 9 months of divorce of parents."]
     )
예제 #6
0
    def test_us35(self):
        self.assertEqual(mf.US35(
            ged.parse_ged(ged.read_ged("testfiles/test-us35.ged").split("\n"))
        ),
            ['US35: no recent births']

        )
예제 #7
0
 def test_us28(self):
     self.assertEqual(yl.us28_list(
         ged.parse_ged(ged.read_ged("testfiles/test-us28.ged").split("\n"))
     ),
         ["US28: List siblings in families by decreasing age:",
          [["F23", ["I19", "Dick /Smith/", "13 FEB 1981"], ["I26", "Jane /Smith/", "2 JUN 1983"]]]
          ]
     )
예제 #8
0
 def test_us09(self):
     with open("testfiles/test-us09.ged") as f:
         parsed = parse_ged(f.read().split('\n'))
         self.assertEqual(mi.us09(parsed), [
             'Error US09: Death date of Alex /Jones/ (3 JAN 1938) occurs before birth date'
         ])
예제 #9
0
 def test_us06(self):
     with open("testfiles/test-us06.ged") as f:
         parsed = parse_ged(f.read().split('\n'))
         self.assertEqual(mi.us06(parsed), [
             'Error US06: Divorce date of jason /Wong/ (I01) occurs after Death date'
         ])
예제 #10
0
 def test_us41(self):
     self.assertEqual(mf.US41_list(
         ged.parse_ged(ged.read_ged("testfiles/test-us41.ged").split("\n"))
     ),
         ['US41: All Dates Made Valid:', [['I02', '10 SEP 1960'], ['I01', '10 JAN 2017']], [['F23', '10 JAN 1980']]]
     )
예제 #11
0
 def test_us42(self):
     self.assertEqual(mf.US42_list(
         ged.parse_ged(ged.read_ged("testfiles/test-us42.ged").split("\n"))
     ),
         ['US42: Invalid dates:', [['I01', '32 JUL 1960'], ['I19', '112 FEB 1981']], [['F24', '45 AUG 2004']]]
     )
예제 #12
0
 def test_us39(self):
     self.assertEqual(mf.US39(
         ged.parse_ged(ged.read_ged("testfiles/test-us39.ged").split("\n"))
     ),
         ['US39: no upcoming anniversaries']
     )
예제 #13
0
 def test_us20(self):
     self.assertEqual(yl.us20(
         ged.parse_ged(ged.read_ged("testfiles/test-us20.ged").split("\n"))
     ),
         ["Anomaly US20: Alex /Smith/ (I31) marries his nieces Jane /Smith/ (I18)"]
     )
예제 #14
0
 def test_us30(self):
     self.assertEqual(mf.US30_list(
         ged.parse_ged(ged.read_ged("testfiles/test-us30.ged").split("\n"))
     ),
         ['US30: list of married couples:', [['I26', 'I27']]]
     )
예제 #15
0
 def test_us07(self):
     self.assertEqual(yl.us07(
         ged.parse_ged(ged.read_ged("testfiles/test-us07.ged").split("\n"))
     ),
     ["Anomaly US07: John Smith (I28) is more than 150 years old."])
예제 #16
0
 def test_us19(self):
     self.assertEqual(yl.us19(
         ged.parse_ged(ged.read_ged("testfiles/test-us19.ged").split("\n"))
     ),
         ["Anomaly US19: Dick /Smith/ (I17) marries his first cousin Jane /Smith/ (I18)."]
     )
예제 #17
0
 def test_us12(self):
     with open("testfiles/test-us12.ged") as f:
         parsed = parse_ged(f.read().split('\n'))
         self.assertEqual(mi.us12(parsed), [
             'Anomaly US12: Father Alex /Jones/ (I01) is at least 80 years older than his child'
         ])
예제 #18
0
 def test_us36(self):
     self.assertEqual(mf.US36(
         ged.parse_ged(ged.read_ged("testfiles/test-us36.ged").split("\n"))
     ),
         ['US36: recent deaths - I01 ']
     )
예제 #19
0
 def test_us16(self):
     self.assertEqual(yl.us16(
         ged.parse_ged(ged.read_ged("testfiles/test-us16.ged").split("\n"))
     ),
         ["Anomaly US16: Not all male members of family F23 have the same last name."]
     )
예제 #20
0
 def test_us38(self):
     self.assertEqual(mf.US38(
         ged.parse_ged(ged.read_ged("testfiles/test-us38.ged").split("\n"))
     ),
         ['US38: no upcoming birthdays']
     )
예제 #21
0
 def setUp(self):
     self.ged = ged.parse_ged(ged.read_ged("testfiles/test-us17.ged").split("\n"))
     self.result = yl.us17(self.ged)