Example #1
0
 def test_balance_left(self):
     #Left Heavy Tree
     Tree = bst.create_unbalanced_tree(7, left_heavy=True)
     self.assertEqual(Tree.balance(), 6)
Example #2
0
 def test_balance_right(self):
     #Right Heavy Tree
     Tree = bst.create_unbalanced_tree(7)
     self.assertEqual(Tree.balance(), -6)
Example #3
0
 def test_depth_unbalanced(self):
     #Unbalanced Tree
     Tree = bst.create_unbalanced_tree(7)
     self.assertEqual(Tree.depth(), 6)