def test1(self): male1 = Individual("P01") female1 = Individual("P02") family1 = Family("F01") male1.set_deathDate(["5", "MAR", "2000"]) female1.set_deathDate(["9", "APR", "2002"]) family1.set_husband(male1) family1.set_wife(female1) family1.set_divorced(["1", "JAN", "1999"]) self.assertTrue(family1.divorce_before_death())
def test_US06_divorse_before_death(self): t1 = Family("F01") male1 = Individual("P01") female1 = Individual("P02") male1.set_deathDate(["5", "MAR", "2000"]) female1.set_deathDate(["9", "APR", "2002"]) t1.set_husband(male1) t1.set_wife(female1) t1.set_divorcedDate(["1", "JAN", "1999"]) # --------------------------------- t2 = Family("F02") male2 = Individual("P03") female2 = Individual("P04") male2.set_deathDate(["5", "MAR", "2000"]) female2.set_deathDate(["9", "APR", "2002"]) t2.set_husband(male2) t2.set_wife(female2) t2.set_divorcedDate(["1", "JAN", "2003"]) # --------------------------------- assert t1.divorce_before_death() == True assert t2.divorce_before_death() == False