mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
Merge with 3.2.
This commit is contained in:
commit
5fffaab1ad
1 changed files with 10 additions and 10 deletions
|
|
@ -191,17 +191,8 @@ class TestHeap(TestCase):
|
|||
self.assertEqual(list(self.module.nlargest(n, data, key=f)),
|
||||
sorted(data, key=f, reverse=True)[:n])
|
||||
|
||||
|
||||
class TestHeapPython(TestHeap):
|
||||
module = py_heapq
|
||||
|
||||
|
||||
@skipUnless(c_heapq, 'requires _heapq')
|
||||
class TestHeapC(TestHeap):
|
||||
module = c_heapq
|
||||
|
||||
def test_comparison_operator(self):
|
||||
# Issue 3501: Make sure heapq works with both __lt__
|
||||
# Issue 3051: Make sure heapq works with both __lt__
|
||||
# For python 3.0, __le__ alone is not enough
|
||||
def hsort(data, comp):
|
||||
data = [comp(x) for x in data]
|
||||
|
|
@ -223,6 +214,15 @@ class TestHeapC(TestHeap):
|
|||
self.assertRaises(TypeError, data, LE)
|
||||
|
||||
|
||||
class TestHeapPython(TestHeap):
|
||||
module = py_heapq
|
||||
|
||||
|
||||
@skipUnless(c_heapq, 'requires _heapq')
|
||||
class TestHeapC(TestHeap):
|
||||
module = c_heapq
|
||||
|
||||
|
||||
#==============================================================================
|
||||
|
||||
class LenOnly:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue