Пример #1
0
 def test_clear_heap_of_random_size(self):
     h = MinMaxHeap([randint(-100, 100) for _ in range(100)])
     self.assertIsNone(h.clear())
     self.assertEqual(h.size, 0)
     self.assertTrue(h.is_empty())
Пример #2
0
 def test_clear_empty_heap(self):
     h = MinMaxHeap()
     self.assertIsNone(h.clear())
     self.assertEqual(h.size, 0)
     self.assertTrue(h.is_empty())