[Python-checkins] cpython (3.1): Some more tests were incorrectly marked as C specific.

ezio.melotti python-checkins at python.org
Mon May 9 17:42:47 CEST 2011


http://hg.python.org/cpython/rev/4a3d5198a408
changeset: 69983:4a3d5198a408
branch: 3.1
parent: 69967:61798f076676
user: Ezio Melotti <ezio.melotti at gmail.com>
date: Mon May 09 18:36:53 2011 +0300
summary:
 Some more tests were incorrectly marked as C specific.
files:
 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
--- a/Lib/test/test_heapq.py
+++ b/Lib/test/test_heapq.py
@@ -191,17 +191,8 @@
 self.assertEqual(list(self.module.nlargest(n, data, key=f)),
 sorted(data, key=f, reverse=True)[:n])
 
-
-class TestHeapPython(TestHeap):
- module = py_heapq
-
-
- at 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 @@
 self.assertRaises(TypeError, data, LE)
 
 
+class TestHeapPython(TestHeap):
+ module = py_heapq
+
+
+ at skipUnless(c_heapq, 'requires _heapq')
+class TestHeapC(TestHeap):
+ module = c_heapq
+
+
 #==============================================================================
 
 class LenOnly:
@@ -377,8 +377,6 @@
 
 
 def test_main(verbose=None):
- from types import BuiltinFunctionType
-
 test_classes = [TestModules, TestHeapPython, TestHeapC, TestErrorHandling]
 support.run_unittest(*test_classes)
 
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /