def test_get_successor(self): n1 = Node(2) n2 = Node(3) n3 = Node(4) n1.add_left(n2) n2.add_right(n3) self.assertEqual(n3.getSuccessor(), n1)
def test_get_successor_basic(self): n1 = Node(2) n2 = Node(3) n1.add_left(n2) self.assertEqual(n2.getSuccessor(), n1)
def test_get_successor_basic_2(self): n1 = Node(2) n2 = Node(3) n1.add_right(n2) self.assertEqual(n1.getSuccessor(), n2)
def test_get_successor_None(self): n1 = Node(2) self.assertIsNone(n1.getSuccessor())