def test_select(self):
     tree = BSTree([70, 50, 200, 30, 60, 55, 100, 300, 80, 150])
     self.assertEqual(tree.select(0), 30)
     self.assertEqual(tree.select(1), 50)
     self.assertEqual(tree.select(2), 55)
     self.assertEqual(tree.select(3), 60)
     self.assertEqual(tree.select(4), 70)
     self.assertEqual(tree.select(8), 200)
     self.assertEqual(tree.select(9), 300)
 def test_select_rank_are_inverses(self):
     tree = BSTree([70, 50, 200, 30, 60, 55, 100, 300, 80, 150])
     self.assertEqual(tree.select(tree.rank(30)), 30)
     self.assertEqual(tree.select(tree.rank(50)), 50)
     self.assertEqual(tree.select(tree.rank(55)), 55)
     self.assertEqual(tree.select(tree.rank(60)), 60)
     self.assertEqual(tree.select(tree.rank(70)), 70)
     self.assertEqual(tree.select(tree.rank(200)), 200)
     self.assertEqual(tree.select(tree.rank(300)), 300)