Skip to content
Snippets Groups Projects
Commit e1b656a4 authored by Andreas Fischer's avatar Andreas Fischer
Browse files

Check for insert and search methods

parent 2335b3de
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,12 @@ class TestBinTree(unittest.TestCase):
tree = BinTree()
self.assertIsNone(tree.root)
def test_has_insert_and_search(self):
tree = BinTree()
tree.insert(1)
tree.search(1)
class TestBinTreeNode(unittest.TestCase):
def test_creation(self):
node = BinTreeNode(5)
......@@ -19,5 +25,10 @@ class TestBinTreeNode(unittest.TestCase):
self.assertIn("left", node.__dict__)
self.assertIn("right", node.__dict__)
def test_has_insert_and_search(self):
node = BinTreeNode(0)
node.insert(1)
node.search(1)
if __name__ == "__main__":
unittest.main()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment