We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7f60928 commit 7b72978Copy full SHA for 7b72978
Lib/test/test_heapq.py
@@ -401,7 +401,8 @@ def test_comparison_operator_modifiying_heap(self):
401
# when comparing objects as they can alter the heap
402
class EvilClass(int):
403
def __lt__(self, o):
404
- heap.clear()
+ # heap.clear()
405
+ del heap[:]
406
return NotImplemented
407
408
heap = []
@@ -412,12 +413,14 @@ def test_comparison_operator_modifiying_heap_two_heaps(self):
412
413
414
class h(int):
415
- list2.clear()
416
+ # list2.clear()
417
+ del list2[:]
418
419
420
class g(int):
421
- list1.clear()
422
+ # list1.clear()
423
+ del list1[:]
424
425
426
list1, list2 = [], []
0 commit comments