Commit 2c60a6d3 authored by Temujin's avatar Temujin

added some tests

parent fc4afe66
......@@ -4,7 +4,41 @@ import unittest
class TestFamilyTree(unittest.TestCase):
def setUp(self):
r"""For testing.
A
/ \
B C
/ \
D E
"""
self.ftree = c.FamilyTree()
ftree = c.FamilyTree()
A = c.Person("A", 69, True)
B = c.Person("B", 69, True)
C = c.Person("C", 69, False)
D = c.Person("D", 69, True)
E = c.Person("E", 666, False)
ftree.insert_person(A)
ftree.insert_person(B)
ftree.insert_person(C)
ftree.insert_person(D)
ftree.insert_person(E)
B.set_parent(A)
C.set_parent(A)
D.set_parent(B)
E.set_parent(B)
ftree.find_root()
def test_find_ancestors(self):
pass
def test_find_descendants(self):
pass
def test_set_generations(self):
pass
def test_relationship(self):
if __name__ == "__main__":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment