Exemplo n.º 1
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 ']])
Exemplo n.º 2
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(), '')
Exemplo n.º 3
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(), '')
Exemplo n.º 4
0
 def test_US08(self):
     repo = Repo()
     repo.read_file("ged/myfamily.ged")
     self.assertEqual(repo.US08(), ['@I1@', '@I24@'])
Exemplo n.º 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())
Exemplo n.º 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())
Exemplo n.º 7
0
 def test_US35(self):
     repo = Repo()
     repo.read_file("ged/My-Family-29-Oct-2019-793.ged")
     self.assertEqual(repo.US35(), ['@I27@'])
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 11
0
 def test_US22(self):
     repo = Repo()
     repo.read_file("ged/myfamily.ged")
     self.assertNotEqual(repo.US22(), list())
Exemplo n.º 12
0
 def test_US21(self):
     repo = Repo()
     repo.read_file("ged/My-Family-28-Oct-2019-667.ged")
     self.assertNotEqual(repo.US21(), list())
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 16
0
 def test_US17(self):
     repo = Repo()
     repo.read_file("ged/us17.ged")
     self.assertEqual(repo.US17(), ['@I1@', '@I3@'])
Exemplo n.º 17
0
 def test_US18(self):
     repo = Repo()
     repo.read_file("ged/myfamily.ged")
     self.assertEqual(repo.US18(), ['@I12@', '@I13@', '@I15@', '@I16@'])
Exemplo n.º 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@')])