Kaydet (Commit) 849564f8 authored tarafından Raymond Hettinger's avatar Raymond Hettinger

Extend test coverage to include heapifying large heaps

üst 63648804
...@@ -65,7 +65,7 @@ class TestHeap: ...@@ -65,7 +65,7 @@ class TestHeap:
self.assertTrue(heap[parentpos] <= item) self.assertTrue(heap[parentpos] <= item)
def test_heapify(self): def test_heapify(self):
for size in range(30): for size in list(range(30)) + [20000]:
heap = [random.random() for dummy in range(size)] heap = [random.random() for dummy in range(size)]
self.module.heapify(heap) self.module.heapify(heap)
self.check_invariant(heap) self.check_invariant(heap)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment