def test_ok_duo6(self): ged1 = self.generate_fam_1( marriage="01 JAN 2000", births=[ "25 DEC 2020", "25 DEC 2021", "25 DEC 2022", "25 DEC 2023", "25 DEC 2024", "25 DEC 2025" ] ) ged2 = self.generate_fam_1( marriage="01 JAN 2000", births=[ "25 DEC 2020", "25 DEC 2021", "25 DEC 2022", "25 DEC 2023", "25 DEC 2024", "25 DEC 2025" ], id=2 ) fams, indis = proj.parse_ged_data(ged1 + ged2) output = validation.list_all_multiple_births(fams, indis) self.assertEqual(output, [])
def test_bad_duo6(self): ged1 = self.generate_fam_1( marriage="01 JAN 2000", births=[ "25 DEC 2020", "25 DEC 2020", "25 DEC 2020", "25 DEC 2020", "25 DEC 2020", "25 DEC 2020" ] ) ged2 = self.generate_fam_1( marriage="01 JAN 2000", births=[ "25 DEC 2020", "25 DEC 2020", "25 DEC 2020", "25 DEC 2020", "25 DEC 2020", "25 DEC 2020" ], id=2 ) fams, indis = proj.parse_ged_data(ged1 + ged2) output = validation.list_all_multiple_births(fams, indis) self.assertEqual(output, ['I1_3', 'I1_4', 'I1_5', 'I1_6', 'I1_7', 'I1_8', 'I2_3', 'I2_4', 'I2_5', 'I2_6', 'I2_7', 'I2_8'])
def test_bad_25(self): ged = self.generate_fam_1( marriage="01 JAN 2000", births=["25 DEC 2020" for _ in range(25)] ) fams, indis = proj.parse_ged_data(ged) output = validation.list_all_multiple_births(fams, indis) self.assertEqual(len(output), 25)
def test_none(self): ged = self.generate_fam_1( marriage="01 JAN 2000", births=[] ) fams, indis = proj.parse_ged_data(ged) output = validation.list_all_multiple_births(fams, indis) self.assertEqual(output, [])
def test_bad_7(self): ged = self.generate_fam_1( marriage="01 JAN 2000", births=[ "25 DEC 2020", "25 DEC 2020", "25 DEC 2020", "26 DEC 2020", "26 DEC 2020", "26 DEC 2020", "26 DEC 2020" ] ) fams, indis = proj.parse_ged_data(ged) output = validation.list_all_multiple_births(fams, indis) self.assertEqual(output, ['I1_3', 'I1_4', 'I1_5', 'I1_6', 'I1_7', 'I1_8', 'I1_9'])