Example #1
0
 def test_remove_2(self):
     a = Node(1)
     for i in range(2, 9):
         a = Node.insert(a, i)
     self.assertEqual(True, Node.containskey(a, 6))
     a = Node.remove(a, 6)
     self.assertEqual(False, Node.containskey(a, 6))
Example #2
0
 def test_contains_none(self):
     a = Node(1)
     for i in range(3, 9):
         a = Node.insert(a, i)
     self.assertEqual(False, Node.containskey(None, 2))
Example #3
0
 def test_contains_true(self):
     a = Node(1)
     for i in range(3, 9):
         a = Node.insert(a, i)
     self.assertEqual(True, Node.containskey(a, 6))