def test_aunt_uncle(relation_test_fam: family_tree.Family): assert (relation_test_fam.relationship( "G1A", "G2C") == constants.RELATION_MATRIX[1][0])
def test_great_grandparent(relation_test_fam: family_tree.Family): assert relation_test_fam.relationship("G1A", "G4A") == "Great Grand-Parent"
def test_siblings(relation_test_fam: family_tree.Family): assert (relation_test_fam.relationship( "G1A", "G1B") == constants.RELATION_MATRIX[0][0])
def test_child(relation_test_fam: family_tree.Family): assert relation_test_fam.relationship("G2B", "G1A") == "Child"
def test_parental(relation_test_fam: family_tree.Family): assert relation_test_fam.relationship("G1A", "G2A") == "Parent"
def test_list_ancestors_layout(relation_test_fam: family_tree.Family): assert relation_test_fam.list_ancestors(relation_test_fam["G1A"]) == [ {"G2B", "G2A"}, {"G3B", "G3A", "G3C", "G3D"}, {"G4A"}, ]
def test_person_addition(my_test_fam: family_tree.Family): test_person = family_tree.Person("JD21990", "James Doe", datetime(1990, 1, 1)) my_test_fam.add_person(test_person) assert len(my_test_fam) == 3
def test_no_duplicates(my_test_fam: family_tree.Family): my_test_fam.add_person(my_test_fam["JJ1996"]) assert len(my_test_fam) == 2