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())
def test_clear_empty_heap(self): h = MinMaxHeap() self.assertIsNone(h.clear()) self.assertEqual(h.size, 0) self.assertTrue(h.is_empty())