@@ -191,17 +191,8 @@ def test_nlargest(self):
191
191
self .assertEqual (list (self .module .nlargest (n , data , key = f )),
192
192
sorted (data , key = f , reverse = True )[:n ])
193
193
194
-
195
- class TestHeapPython (TestHeap ):
196
- module = py_heapq
197
-
198
-
199
- @skipUnless (c_heapq , 'requires _heapq' )
200
- class TestHeapC (TestHeap ):
201
- module = c_heapq
202
-
203
194
def test_comparison_operator (self ):
204
- # Issue 3501 : Make sure heapq works with both __lt__
195
+ # Issue 3051 : Make sure heapq works with both __lt__
205
196
# For python 3.0, __le__ alone is not enough
206
197
def hsort (data , comp ):
207
198
data = [comp (x ) for x in data ]
@@ -223,6 +214,15 @@ def __le__(self, other):
223
214
self .assertRaises (TypeError , data , LE )
224
215
225
216
217
+ class TestHeapPython (TestHeap ):
218
+ module = py_heapq
219
+
220
+
221
+ @skipUnless (c_heapq , 'requires _heapq' )
222
+ class TestHeapC (TestHeap ):
223
+ module = c_heapq
224
+
225
+
226
226
#==============================================================================
227
227
228
228
class LenOnly :
@@ -377,8 +377,6 @@ def test_iterable_args(self):
377
377
378
378
379
379
def test_main (verbose = None ):
380
- from types import BuiltinFunctionType
381
-
382
380
test_classes = [TestModules , TestHeapPython , TestHeapC , TestErrorHandling ]
383
381
support .run_unittest (* test_classes )
384
382
0 commit comments