[Python-checkins] cpython: Extend test coverage to include heapifying large heaps

raymond.hettinger python-checkins at python.org
Wed May 13 06:42:47 CEST 2015


https://hg.python.org/cpython/rev/d246984e1ca0
changeset:   96000:d246984e1ca0
user:        Raymond Hettinger <python at rcn.com>
date:        Tue May 12 21:42:40 2015 -0700
summary:
  Extend test coverage to include heapifying large heaps

files:
  Lib/test/test_heapq.py |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Lib/test/test_heapq.py b/Lib/test/test_heapq.py
--- a/Lib/test/test_heapq.py
+++ b/Lib/test/test_heapq.py
@@ -65,7 +65,7 @@
                 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)

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list