def testCountNoOfNodes(self): tree = BinarySearchTree() l = range(100) for d in l: tree.insert(d) self.assertEqual(tree.size(), len(l))