예제 #1
0
 def test_US23(self):
     """US23 - No more than one individual with the same name and birth date should appear in a GEDCOM file"""
     repo = Repo()
     repo.read_file("ged/das.ged")
     self.assertEqual(repo.US23(), True)
     self.assertNotEqual(repo.US23(), False)
     self.assertTrue(repo.US23())
     self.assertIsNotNone(repo.US23())
     self.assertIsNot(repo.US23(), '')
예제 #2
0
 def test_US24(self):
     """US24 - Unique families by spouses"""
     repo = Repo()
     repo.read_file("ged/das.ged")
     self.assertEqual(repo.US24(), True)
     self.assertNotEqual(repo.US24(), False)
     self.assertTrue(repo.US24())
     self.assertIsNotNone(repo.US24())
     self.assertIsNot(repo.US24(), '')
예제 #3
0
 def test_US25(self):
     repo = Repo()
     repo.read_file("ged/myfamily.ged")
     self.assertEqual(
         repo.US25(),
         [['Surinder '], ['Nirmal '], ['Boney '], ['Sridevi '], ['Anil '],
          ['Sunita '], ['Sanjay '], ['Maheep '], ['Sonam '], ['Rhea '],
          ['Harshvardhan '], ['Shanaya '], ['Jahaan '], ['Mona '], [
              'Arjun '
          ], ['Anshula '], ['Khushi '], ['Janhvi '], ['John '], ['Allen '],
          ['Lily '], ['Vu '], ['Sue '], ['Shilpy '], ['Das '], ['Deepa ']])
예제 #4
0
 def test_US08(self):
     repo = Repo()
     repo.read_file("ged/myfamily.ged")
     self.assertEqual(repo.US08(), ['@I1@', '@I24@'])
예제 #5
0
 def test_US01(self):
     repo = Repo()
     repo.read_file("ged/das.ged")
     self.assertEqual(repo.US01(), True)
     self.assertNotEqual(repo.US01(), False)
     self.assertTrue(repo.US01())
예제 #6
0
 def test_US11(self):
     repo = Repo()
     repo.read_file("ged/My-Family-29-Oct-2019-620.ged")
     self.assertNotEqual(repo.US11(), True)
     self.assertFalse(repo.US11())
예제 #7
0
 def test_US35(self):
     repo = Repo()
     repo.read_file("ged/My-Family-29-Oct-2019-793.ged")
     self.assertEqual(repo.US35(), ['@I27@'])
예제 #8
0
 def test_US09(self):  # Birth before death of parents
     repo = Repo()
     repo.read_file("ged/test_yz.ged")
     result = repo.US09()
     expect = {'I7', 'I9'}
     self.assertEqual(result, expect)
예제 #9
0
 def test_US30(self):  # List living married
     repo = Repo()
     repo.read_file("ged/test_yz.ged")
     result = repo.US30()
     expect = {'I2', 'I3', 'I4', 'I6', 'I7', 'I8', 'I9', 'I10'}
     self.assertEqual(result, expect)
예제 #10
0
 def test_US29(self):  # List deceased
     repo = Repo()
     repo.read_file("ged/test_yz.ged")
     result = repo.US29()
     expect = {'I1', 'I5'}
     self.assertEqual(result, expect)
예제 #11
0
 def test_US22(self):
     repo = Repo()
     repo.read_file("ged/myfamily.ged")
     self.assertNotEqual(repo.US22(), list())
예제 #12
0
 def test_US21(self):
     repo = Repo()
     repo.read_file("ged/My-Family-28-Oct-2019-667.ged")
     self.assertNotEqual(repo.US21(), list())
예제 #13
0
 def test_US20(self):  # Aunts and uncles
     repo = Repo()
     repo.read_file("ged/test_yz.ged")
     result = repo.US20()
     expect = {'F5'}
     self.assertEqual(result, expect)
예제 #14
0
 def test_US19(self):  # First cousins should not marry
     repo = Repo()
     repo.read_file("ged/test_yz.ged")
     result = repo.US19()
     expect = {'F4', 'F5'}
     self.assertEqual(result, expect)
예제 #15
0
 def test_US10(self):  # Marriage after 14
     repo = Repo()
     repo.read_file("ged/test_yz.ged")
     result = repo.US10()
     expect = {'I2', 'I3'}
     self.assertEqual(result, expect)
예제 #16
0
 def test_US17(self):
     repo = Repo()
     repo.read_file("ged/us17.ged")
     self.assertEqual(repo.US17(), ['@I1@', '@I3@'])
예제 #17
0
 def test_US18(self):
     repo = Repo()
     repo.read_file("ged/myfamily.ged")
     self.assertEqual(repo.US18(), ['@I12@', '@I13@', '@I15@', '@I16@'])
예제 #18
0
 def test_US28(self):
     repo = Repo()
     repo.read_file("ged/myfamily.ged")
     self.assertEqual(repo.US28()[0], [(-2982, '@I5@'), (7, '@I21@'),
                                       (36, '@I3@'), (54, '@I7@')])
     self.assertEqual(repo.US28()[1], [(85, '@I1@'), (239, '@I24@')])