示例#1
0
 def test_contains_true(self):
     h = MinMaxHeap([6, 8, 2, 2, 60, 7, 9])
     self.assertTrue(h.contains(2))
示例#2
0
 def test_contains_false(self):
     h = MinMaxHeap([6, 8, 2, 60, 7, 9, 3, 67])
     self.assertFalse(h.contains(10))
示例#3
0
 def test_contains_when_empty_heap(self):
     h = MinMaxHeap()
     self.assertFalse(h.contains(3))