]> granicus.if.org Git - python/commitdiff
Extend test coverage to include heapifying large heaps
authorRaymond Hettinger <python@rcn.com>
Wed, 13 May 2015 04:42:40 +0000 (21:42 -0700)
committerRaymond Hettinger <python@rcn.com>
Wed, 13 May 2015 04:42:40 +0000 (21:42 -0700)
Lib/test/test_heapq.py

index 0dcd8c5161ad1bfc581a526dc0298f6fba25bce0..b7e8259f8def2a2cd3df175edffcffe407ddff4d 100644 (file)
@@ -65,7 +65,7 @@ class TestHeap:
                 self.assertTrue(heap[parentpos] <= item)
 
     def test_heapify(self):
-        for size in range(30):
+        for size in list(range(30)) + [20000]:
             heap = [random.random() for dummy in range(size)]
             self.module.heapify(heap)
             self.check_invariant(heap)