Skip to content

Commit cebbc88

Browse files
Missed one of Benedikt's requested changes
1 parent f4fd94a commit cebbc88

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/test_heapq.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ def check_invariant(self, heap):
111111
self.assertTrue(heap[parentpos] <= item)
112112

113113
def check_max_invariant(self, heap):
114-
for pos in range(1, len(heap)):
114+
for pos, item in enumerate(heap[1:], start=1):
115115
parentpos = (pos - 1) >> 1
116-
self.assertGreaterEqual(heap[parentpos], heap[pos])
116+
self.assertGreaterEqual(heap[parentpos], item)
117117

118118
def test_heapify(self):
119119
for size in list(range(30)) + [20000]:

0 commit comments

Comments
 (0)