def testNumChildrenWithTwoChildren(self): testNode = BSTNode(15) testNode.left = 10 testNode.right = 30 self.assertEqual(testNode.left, 10) self.assertEqual(testNode.right, 30)
def testGetLenFollowingNode(self): rootNode = BSTNode(50) rootNode.left = BSTNode(25) rootNode.right = BSTNode(100) self.assertEqual(rootNode.getLenFollowingNode(), 3)
def testGetrightWithChildren(self): testNode = BSTNode(15) testNode.right = 20 self.assertEqual(testNode.getright(), 20)