diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2011-05-09 15:36:53 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2011-05-09 15:36:53 (GMT) |
commit | f9756c2336029d082317718cd1b2e330f48164d6 (patch) | |
tree | 581fa0fd90eba1cd603be9828fb57055a1ed7b80 /Lib/test/test_heapq.py | |
parent | 2f48d892d4036b500f5b79d152b3166b4d205dc9 (diff) | |
download | cpython-f9756c2336029d082317718cd1b2e330f48164d6.zip cpython-f9756c2336029d082317718cd1b2e330f48164d6.tar.gz cpython-f9756c2336029d082317718cd1b2e330f48164d6.tar.bz2 |
Some more tests were incorrectly marked as C specific.
Diffstat (limited to 'Lib/test/test_heapq.py')
-rw-r--r-- | Lib/test/test_heapq.py | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/Lib/test/test_heapq.py b/Lib/test/test_heapq.py index 3016c30..9682f6e 100644 --- a/Lib/test/test_heapq.py +++ b/Lib/test/test_heapq.py @@ -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: @@ -377,8 +377,6 @@ class TestErrorHandling(TestCase): def test_main(verbose=None): - from types import BuiltinFunctionType - test_classes = [TestModules, TestHeapPython, TestHeapC, TestErrorHandling] support.run_unittest(*test_classes) |