def setUp(self): self.OkayIndi = Individual('@okay@') self.OkayIndi.apply_value('BIRT', parse_date('1 JAN 2001')) self.BadIndiMarr = Individual('@badmarriage@') self.BadIndiMarr.apply_value('BIRT', parse_date('30 DEC 2000')) self.NoIndiBirth = Individual('@nobirth@') self.BadIndiDiv = Individual('@baddivorce@') self.BadIndiDiv.apply_value('BIRT', parse_date('5 OCT 2001')) self.MarrFam = Family('@marriedf@') self.MarrFam.apply_value('MARR', parse_date('1 JAN 2001')) self.MarrFam.add_child_ref(self.OkayIndi) self.MarrFam.add_child_ref(self.BadIndiMarr) self.MarrFam.add_child_ref(self.NoIndiBirth) self.NoMarrFam = Family('@nomarriagef@') self.NoMarrFam.add_child_ref(self.OkayIndi) self.NoChildBirthFam = Family('@nochildbirthday@') self.NoChildBirthFam.add_child_ref(self.NoIndiBirth) self.NoDivFam = Family('@nodivorcef@') self.NoDivFam.add_child_ref(self.NoIndiBirth) self.DivFam = Family('@divorcedf@') self.DivFam.apply_value('DIV', parse_date('1 JAN 2001')) self.DivFam.add_child_ref(self.BadIndiDiv)
def setUp(self): self.OkayIndi = Individual('@okay@') self.OkayFam = Family('@okayf@') self.OkayIndi.apply_value('BIRT', parse_date('1 JUN 1945')) self.OkayIndi.apply_value('DEAT', parse_date('6 JAN 1995')) self.OkayFam.apply_value('MARR', parse_date('1 JUN 1975')) self.OkayFam.apply_value('HUSB', '@okay@') self.OkayFam.add_spouse_ref('HUSB', self.OkayIndi) self.BadBirth = Individual('@birth@') self.BadFam = Family('@badf@') self.BadBirth.apply_value('BIRT', parse_date('7 JAN 1995')) self.BadBirth.apply_value('DEAT', parse_date('6 JAN 1995')) self.BadFam.apply_value('MARR', parse_date('6 JAN 1995')) self.BadFam.apply_value('HUSB', '@birth@') self.BadFam.add_spouse_ref('HUSB', self.BadBirth) self.MissingBirth = Individual('@nobirth@') self.MissingBirthFam = Family('@badfnb@') self.MissingBirth.apply_value('DEAT', parse_date('6 JAN 1995')) self.MissingBirthFam.apply_value('MARR', parse_date('6 JAN 1995')) self.MissingBirthFam.apply_value('HUSB', '@nobirth@') self.MissingBirthFam.add_spouse_ref('HUSB', self.MissingBirth) self.MissingMarr = Individual('@nomarr@') self.MissingMarrFam = Family('@badfnm@') self.MissingMarr.apply_value('BIRT', parse_date('7 JAN 1995')) self.MissingMarr.apply_value('DEAT', parse_date('6 JAN 1995')) self.MissingMarrFam.apply_value('HUSB', '@nomarr@') self.MissingMarrFam.add_spouse_ref('HUSB', self.MissingMarr)
def test_birth_and_death(self): self.birthDeathIndi = Individual('@birthDeathIndi') self.birthDeathIndi.apply_value('BIRT', parse_date('1 JAN 2017')) self.birthDeathIndi.apply_value('DEAT', parse_date('31 DEC 2017')) self.assertEqual(0, self.birthDeathIndi.age) self.birthDeathIndi.apply_value('DEAT', parse_date('1 JAN 2018')) self.assertEqual(1, self.birthDeathIndi.age)
def setUp(self): self.OkayIndi = Individual('@okay@') self.OkayIndi.apply_value('BIRT', parse_date('1 JUN 1945')) self.OkayIndi.apply_value('DEAT', parse_date('6 JAN 1995')) self.BadBirth = Individual('@birth@') self.BadBirth.apply_value('BIRT', parse_date('7 JAN 1995')) self.BadBirth.apply_value('DEAT', parse_date('6 JAN 1995'))
def setUp(self): self.OkayIndi1 = Individual('@okay1@') self.OkayIndi2 = Individual('@okay2@') self.OkayIndi1.apply_value('BIRT', parse_date('1 JUN 1945')) self.OkayIndi2.apply_value('BIRT', parse_date('1 JUN 1945')) self.OkayIndi1.apply_value('NAME', 'Prince William') self.OkayIndi2.apply_value('NAME', 'Princess Kate') self.OkayFam = Family('@okayf@') self.OkayFam.apply_value('HUSB', '@okay1@') self.OkayFam.apply_value('WIFE', '@okay2@')
def setUp(self): self.OkayIndi1 = Individual('@okay1@') self.OkayIndi2 = Individual('@okay2@') self.OkayIndi3 = Individual('@okay3@') self.OkayIndi1.apply_value('BIRT', parse_date('1 JUN 2018')) self.OkayIndi2.apply_value('BIRT', parse_date('18 SEP 2017')) self.OkayIndi3.apply_value('BIRT', parse_date('1 JUN 2018')) self.OkayIndi1.apply_value('NAME', 'Prince William') self.OkayIndi2.apply_value('NAME', 'CrankyFranky') self.OkayIndi1.apply_value('NAME', 'BabyB /Rabbits/') self.OkayIndi3.apply_value('NAME', 'BabyC /Rabbits/')
def setUp(self): self.Mother = Individual('@okayMom@') self.Mother.apply_value('DEAT', parse_date('1 SEP 1995')) self.Father = Individual('@okayFather@') self.Father.apply_value('DEAT', parse_date('1 JAN 1995')) self.childafterMomDeath = Individual('@birthafterMomdeath@') self.childafterMomDeath.apply_value('BIRT', parse_date('2 SEP 1995')) self.childafterFatherDeath = Individual('@birthafterDaddeath@') self.childafterFatherDeath.apply_value('BIRT', parse_date('1 NOV 1995')) self.BadFam = Family('@badchildbirth@') self.BadFam.add_spouse_ref('HUSB', self.Father) self.BadFam.add_spouse_ref('WIFE', self.Mother) self.BadFam.add_child_ref(self.childafterMomDeath) self.BadFam.add_child_ref(self.childafterFatherDeath)
def setUp(self): self.OkayFam = Family('@okayf@') self.OkayFam.apply_value('MARR', parse_date('1 JUN 1975')) self.OkayFam.apply_value('DIV', parse_date('1 JUN 1975')) self.BadFam = Family('@badf@') self.BadFam.apply_value('MARR', parse_date('6 JAN 1995')) self.BadFam.apply_value('DIV', parse_date('5 JAN 1995')) self.MissingDivFam = Family('@badfnd@') self.MissingDivFam.apply_value('MARR', parse_date('6 JAN 1995')) self.MissingMarrFam = Family('@badfnm@') self.MissingMarrFam.apply_value('DIV', parse_date('6 JAN 1995'))
def setUp(self): """Set up a bunch of Individuals and Families with various future date issues (and some that are Okay).""" self.OkayIndi = Individual("@okay@") self.OkayIndi.apply_value("BIRT", parse_date("1 JUN 1945")) self.OkayIndi.apply_value("DEAT", parse_date("6 JAN 1995")) self.BadBirth = Individual("@birth@") self.BadBirth.apply_value("BIRT", parse_date("1 JAN 2525")) self.BadDeath = Individual("@death@") self.BadDeath.apply_value("BIRT", parse_date("1 JUN 1945")) self.BadDeath.apply_value("DEAT", parse_date("1 JAN 4545")) self.OkayFam = Family("@okayf@") self.OkayFam.apply_value("MARR", parse_date("15 SEP 1960")) self.OkayFam.apply_value("DIV", parse_date("15 SEP 1970")) self.BadMarr = Family("@badmarr@") self.BadMarr.apply_value("MARR", parse_date("15 SEP 2960")) self.BadDiv = Family("@baddiv@") self.BadDiv.apply_value("DIV", parse_date("15 SEP 2970")) self.DoubleBadIndi = Individual("@doubleIndi@") self.DoubleBadIndi.apply_value("BIRT", parse_date("1 JUN 3945")) self.DoubleBadIndi.apply_value("DEAT", parse_date("1 JAN 4545")) self.DoubleBadFam = Family("@doubleFam@") self.DoubleBadFam.apply_value("MARR", parse_date("15 SEP 2960")) self.DoubleBadFam.apply_value("DIV", parse_date("15 SEP 2970"))
def setUp(self): self.OkayIndi1 = Individual('@okay1@') self.OkayIndi1.apply_value('BIRT', parse_date('1 JUN 1985')) self.OkayIndi1.apply_value('NAME', 'Porky Pig')
def setUp(self): self.OkayIndi1 = Individual('@okay1@') self.OkayIndi1.apply_value('DEAT', parse_date('1 JUN 1945')) self.OkayIndi1.apply_value('NAME', 'Prince William')
def setUp(self): self.OkayIndi1 = Individual('@okay1@') self.OkayIndi1.apply_value('BIRT', parse_date('1 JUN 1985')) self.OkayIndi1.apply_value('DEAT', parse_date('1 JUN 2015')) self.OkayIndi1.apply_value('NAME', 'Princess Kate')