import gedcom import unittest import us03 gedcomFile = open('../gedcom_files/us03.ged', 'r') collection = gedcom.parseFile(gedcom.validateFile(gedcomFile)) indiCol = gedcom.buildIndividualCollection(collection) famCol = gedcom.buildFamilyCollection(collection) class TestAge(unittest.TestCase): def test_db4b(self): result = us03.getdb4b(indiCol) self.assertEqual(result, ['us03_iid4']) if __name__ == '__main__': unittest.main()
import us11 import us18 import us19 import us21 import us22 import us26 import us29 import us31 import us38 try: gedcomFile = gedcom.readFile() except KeyboardInterrupt: print('\nGoodbye!\n') validatedFile = gedcom.validateFile(gedcomFile) gedcomCollection = gedcom.parseFile(validatedFile) individualCollection = gedcom.buildIndividualCollection(gedcomCollection) familyCollection = gedcom.buildFamilyCollection(gedcomCollection) prettyGedcomTable = gedcom.makePrettyTable(individualCollection, familyCollection) us01.getFutureDates(individualCollection) us01.getFutureDates(familyCollection) us02.birthBeforeMarriage(familyCollection, individualCollection) us03.getdb4b(individualCollection) us04.marriedBeforeDivorced(familyCollection) us05.getDb4M(individualCollection, familyCollection) us06.getDivb4D(individualCollection, familyCollection)