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

ezio.melotti python-checkins at python.org
Mon May 9 06:30:40 CEST 2011


http://hg.python.org/cpython/rev/07d124f340cd
changeset:   69960:07d124f340cd
branch:      3.2
parent:      69956:754bafe8db5f
user:        Ezio Melotti <ezio.melotti at gmail.com>
date:        Mon May 09 07:20:47 2011 +0300
summary:
  Some tests were incorrectly marked as C specific.

files:
  Lib/test/test_heapq.py |  12 +++++++++---
  1 files changed, 9 insertions(+), 3 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
@@ -308,8 +308,7 @@
     return chain(map(lambda x:x, R(Ig(G(seqn)))))
 
 class TestErrorHandling(unittest.TestCase):
-    # only for C implementation
-    module = c_heapq
+    module = None
 
     def test_non_sequence(self):
         for f in (self.module.heapify, self.module.heappop):
@@ -359,12 +358,19 @@
                 self.assertRaises(TypeError, f, 2, N(s))
                 self.assertRaises(ZeroDivisionError, f, 2, E(s))
 
+class TestErrorHandlingPython(TestErrorHandling):
+    module = py_heapq
+
+class TestErrorHandlingC(TestErrorHandling):
+    module = c_heapq
+
 
 #==============================================================================
 
 
 def test_main(verbose=None):
-    test_classes = [TestHeapPython, TestHeapC, TestErrorHandling]
+    test_classes = [TestHeapPython, TestHeapC, TestErrorHandlingPython,
+                    TestErrorHandlingC]
     support.run_unittest(*test_classes)
 
     # verify reference counting

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list