Skip to content

Commit f9756c2

Browse files
committed
Some more tests were incorrectly marked as C specific.
1 parent 2f48d89 commit f9756c2

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

Lib/test/test_heapq.py

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -191,17 +191,8 @@ def test_nlargest(self):
191191
self.assertEqual(list(self.module.nlargest(n, data, key=f)),
192192
sorted(data, key=f, reverse=True)[:n])
193193

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-
203194
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__
205196
# For python 3.0, __le__ alone is not enough
206197
def hsort(data, comp):
207198
data = [comp(x) for x in data]
@@ -223,6 +214,15 @@ def __le__(self, other):
223214
self.assertRaises(TypeError, data, LE)
224215

225216

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+
226226
#==============================================================================
227227

228228
class LenOnly:
@@ -377,8 +377,6 @@ def test_iterable_args(self):
377377

378378

379379
def test_main(verbose=None):
380-
from types import BuiltinFunctionType
381-
382380
test_classes = [TestModules, TestHeapPython, TestHeapC, TestErrorHandling]
383381
support.run_unittest(*test_classes)
384382

0 commit comments

Comments
 (0)