Commit 0ea8ba34 authored by Temujin's avatar Temujin

removed set_root

parent b6b4a537
"""Family Tree project for CSCI 30.""" """Family Tree project for CSCI 30."""
class FamilyTree: class FamilyTree:
"""A family tree. """A family tree.
...@@ -49,10 +48,6 @@ class FamilyTree: ...@@ -49,10 +48,6 @@ class FamilyTree:
self.root = arbitrary_node self.root = arbitrary_node
def set_root(self, person):
"""Set the root node manually."""
self.root = person.get_name()
def insert_person(self, person): def insert_person(self, person):
"""Add a Person object to the dict with the name as the key.""" """Add a Person object to the dict with the name as the key."""
self.family_tree[person.get_name()] = person self.family_tree[person.get_name()] = person
......
import sys
import os
sys.path.insert(0, os.path.abspath(
os.path.join(os.path.dirname(__file__), '..')))
import family_tree
import context as c
import unittest
class TestFamilyTree(unittest.TestCase):
def setUp(self):
self.ftree = c.FamilyTree()
if __name__ == "__main__":
unittest.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