예제 #1
0
 def test_get_individual_ages(self):
     reset()
     gedcomStructuredData = generateInitialData("gedFiles/Choy_family.ged")
     indiList = gedcomStructuredData['indiList']
     reset()
     result = get_individual_age(indiList)
     self.assertTrue(result)
예제 #2
0
 def test_find_family_ids(self):
     reset()
     gedcomStructuredData = generateInitialData("gedFiles/Choy_family.ged")
     famList = gedcomStructuredData['famList']
     reset()
     result = script.find_family_ids(famList)
     self.assertTrue(result)
예제 #3
0
 def test_get_deceased_records_1(self):
     reset()
     gedcomStructuredData = generateInitialData("gedFiles/Choy_family.ged")
     indiList = gedcomStructuredData['indiList']
     reset()
     result = get_deceased_records(indiList)[0]
     self.assertEqual(result, 1)
예제 #4
0
 def test_get_married_list(self):
     reset()
     gedcomStructuredData = generateInitialData("gedFiles/Choy_family.ged")
     famList = gedcomStructuredData['famList']
     reset()
     result = script.get_married_list(famList)
     self.assertTrue(result)
 def test0(self):
     reset()
     gedcomStructuredData	= generateInitialData("allTest.ged") #store the tables and lists into gedcomStructuredData
     famList	= gedcomStructuredData['famList']
     indiList = gedcomStructuredData['indiList']
     result = realBirthday(indiList, famList)
     self.assertEqual(result, 4)
예제 #6
0
 def test_get_parents_not_too_old_2(self):
     reset()
     gedcomStructuredData = generateInitialData("gedFiles/Choy_family.ged")
     famList = gedcomStructuredData['famList']
     reset()
     result = get_parents_not_too_old(famList)[1]
     self.assertTrue(result)
예제 #7
0
 def test_2MarriageAfterDivorce(self):
     reset()
     gedcomStructuredData = generateInitialData(
         "gedFiles/2MarrAfterDiv.ged"
     )  #store the tables and lists into gedcomStructuredData
     famList = gedcomStructuredData['famList']
     result = verifyMarriageDivorceOrder(famList)
     self.assertEqual(result, 2)
    def test_Pass_upcomingAnni(self):
        reset()
        gedcomeStructuredData5 = generateInitialData(
            "gedFiles/MarriageNov28.ged")
        famList = gedcomeStructuredData5['famList']

        result = upcomingAnni(famList)
        self.assertTrue(result)
예제 #9
0
 def testTestSameName_0(self):
     reset()
     gedcomStructuredData = generateInitialData(
         "gedFiles/Choy_familyTree.ged"
     )  #store the tables and lists into gedcomStructuredData
     indiDF = gedcomStructuredData['indiDF']
     result = sameName(indiDF)
     self.assertEqual(result, 0)
    def test_Fail_upcomingAnni(self):
        reset()
        gedcomeStructuredData5 = generateInitialData(
            "gedFiles/cousinMarriage.ged")
        famList = gedcomeStructuredData5['famList']

        result = upcomingAnni(famList)
        self.assertFalse(result)
예제 #11
0
 def test_2BirthAfterDeath(self):
     reset()
     gedcomStructuredData = generateInitialData(
         "gedFiles/2BirthAfterDeath.ged"
     )  #store the tables and lists into gedcomStructuredData
     indiList = gedcomStructuredData['indiList']
     result = verifyBirthDeathDateOrder(indiList)
     self.assertEqual(result, 2)
예제 #12
0
 def test_empty(self):
     print("Testing Find Triplets Empty")
     reset()
     gedcomStructuredData = generateInitialData(
         "family_project.ged"
     )  #store the tables and lists into gedcomStructuredData
     famList = gedcomStructuredData['famList']
     result = findTriplets(famList)
     self.assertEqual(result, [])
예제 #13
0
 def test_twins(self):
     print("Testing Find Twins")
     reset()
     gedcomStructuredData = generateInitialData(
         "gedFiles/twins.ged"
     )  #store the tables and lists into gedcomStructuredData
     famList = gedcomStructuredData['famList']
     result = findTwins(famList)
     self.assertEqual(result, [["I48", "I56"]])
예제 #14
0
 def test_failure(self):
     print("Testing Dupe Spouses Failure")
     reset()
     gedcomStructuredData = generateInitialData(
         "gedFiles/dupeSpouses.ged"
     )  #store the tables and lists into gedcomStructuredData
     famList = gedcomStructuredData['famList']
     result = check_dupe_spouses(famList)
     self.assertFalse(result)
예제 #15
0
 def test_success(self):
     print("Testing Dupe Spouses Success")
     reset()
     gedcomStructuredData = generateInitialData(
         "family_project.ged"
     )  #store the tables and lists into gedcomStructuredData
     famList = gedcomStructuredData['famList']
     result = check_dupe_spouses(famList)
     self.assertTrue(result)
예제 #16
0
    def test_get_list_of_oldest_fail(self):
        reset()
        gedcomeStructuredData = generateInitialData("gedFiles/oldest_fail.ged")
        indiList = gedcomeStructuredData['indiList']
        famList = gedcomeStructuredData['famList']

        result = get_list_of_oldest(indiList, famList)
        self.assertFalse(result)
        self.assertIs(result, False)
예제 #17
0
 def test_success(self):
     print("Testing Unique Child Success")
     reset()
     gedcomStructuredData = generateInitialData(
         "family_project.ged"
     )  #store the tables and lists into gedcomStructuredData
     famList = gedcomStructuredData['famList']
     result = check_unique_child(famList)
     self.assertTrue(result)
예제 #18
0
 def test_fail(self):
     print("Testing Birth Before Marriage Failure")
     reset()
     gedcomStructuredData = generateInitialData(
         "gedFiles/2BirthAfterMarriage.ged"
     )  #store the tables and lists into gedcomStructuredData
     famList_2warnings = gedcomStructuredData['famList']
     result = birthBeforeMarriage(famList_2warnings)
     self.assertFalse(result)
예제 #19
0
    def test_find_recent_death_pass(self):
        reset()
        gedcomeStructuredData = generateInitialData(
            "gedFiles/nov28_recent_death.ged")
        indiList = gedcomeStructuredData['indiList']

        result = findRecentDeath(indiList)
        self.assertTrue(result)
        self.assertIs(result, True)
예제 #20
0
    def test_find_children_born_before_parent_pass(self):
        reset()
        gedcomeStructuredData = generateInitialData(
            "gedFiles/born_before_parent.ged")
        indiList = gedcomeStructuredData['famList']

        result = FindChildrenBornBeforeParent(indiList)
        self.assertTrue(result)
        self.assertIs(result, True)
예제 #21
0
    def test_find_children_born_before_parent_fail(self):
        reset()
        gedcomeStructuredData0 = generateInitialData(
            "gedFiles/not_born_before_parent.ged")
        indiList = gedcomeStructuredData0['famList']

        result = FindChildrenBornBeforeParent(indiList)
        self.assertFalse(result)
        self.assertIs(result, False)
예제 #22
0
    def test_get_list_of_widow_pass(self):
        reset()
        gedcomeStructuredData = generateInitialData("gedFiles/widow_pass.ged")
        indiList = gedcomeStructuredData['indiList']
        famList = gedcomeStructuredData['famList']

        result = get_list_of_widow(indiList, famList)
        self.assertTrue(result)
        self.assertIs(result, True)
예제 #23
0
 def test_triplets(self):
     print("Testing Find Triplets")
     reset()
     gedcomStructuredData = generateInitialData(
         "gedFiles/triplets.ged"
     )  #store the tables and lists into gedcomStructuredData
     famList = gedcomStructuredData['famList']
     result = check_unique_child(famList)
     self.assertEqual(result, [["I48", "I56", "I64"]])
    def test_Pass_listDeceasedDivor(self):
        reset()
        gedcomeStructuredData5 = generateInitialData(
            "gedFiles/cousinMarriageChrisSmithDead.ged")
        famList = gedcomeStructuredData5['famList']
        indiDF = gedcomeStructuredData5['indiDF']

        result = listDeceasedDivor(indiDF, famList)
        self.assertTrue(result)
예제 #25
0
 def test_success(self):
     print("Testing Birth Before Marriage Success")
     reset()
     gedcomStructuredData = generateInitialData(
         "gedFiles/0BirthAfterDeath.ged"
     )  #store the tables and lists into gedcomStructuredData
     famList_0warnings = gedcomStructuredData['famList']
     result = birthBeforeMarriage(famList_0warnings)
     self.assertTrue(result)
    def test_Fail_listDeceasedDivor(self):
        reset()
        gedcomeStructuredData5 = generateInitialData(
            "gedFiles/cousinMarriage.ged")
        famList = gedcomeStructuredData5['famList']
        indiDF = gedcomeStructuredData5['indiDF']

        result = listDeceasedDivor(indiDF, famList)
        self.assertFalse(result)
예제 #27
0
 def test_failure(self):
     print("Testing Gender Roles Failure")
     reset()
     gedcomStructuredData = generateInitialData(
         "gedFiles/WrongGenders.ged"
     )  #store the tables and lists into gedcomStructuredData
     famList = gedcomStructuredData['famList']
     result = check_gender_roles(famList)
     self.assertFalse(result)
예제 #28
0
    def test_find_recent_death_fail(self):
        reset()
        gedcomeStructuredData0 = generateInitialData(
            "gedFiles/oct4_recent_death.ged")
        indiList = gedcomeStructuredData0['indiList']

        result = findRecentDeath(indiList)
        self.assertFalse(result)
        self.assertIs(result, False)
예제 #29
0
 def test_failure(self):
     print("Testing Unique Child Failure")
     reset()
     gedcomStructuredData = generateInitialData(
         "gedFiles/NoUniqueChildren.ged"
     )  #store the tables and lists into gedcomStructuredData
     famList = gedcomStructuredData['famList']
     result = check_unique_child(famList)
     self.assertFalse(result)
예제 #30
0
    def test_replace_id_with_children_data(self):
        reset()
        gedcomStructuredData = generateInitialData("gedFiles/Choy_family.ged")
        famList = gedcomStructuredData['famList']
        reset()

        for i in range(len(famList)):
            result = replace_id_with_children_data([famList[i]['Children']])
        self.assertTrue(result)