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

raymond.hettinger python-checkins at python.org
Sat May 7 23:16:51 CEST 2011


http://hg.python.org/cpython/rev/a8b82c283524
changeset:   69932:a8b82c283524
branch:      2.7
user:        Raymond Hettinger <python at rcn.com>
date:        Sat May 07 14:16:42 2011 -0700
summary:
  Some tests were incorrectly marked as C specific.

files:
  Lib/test/test_heapq.py |  11 ++++++++---
  1 files changed, 8 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
@@ -305,8 +305,6 @@
     return chain(imap(lambda x:x, R(Ig(G(seqn)))))
 
 class TestErrorHandling(unittest.TestCase):
-    # only for C implementation
-    module = c_heapq
 
     def test_non_sequence(self):
         for f in (self.module.heapify, self.module.heappop):
@@ -351,12 +349,19 @@
                 self.assertRaises(TypeError, f, 2, N(s))
                 self.assertRaises(ZeroDivisionError, f, 2, E(s))
 
+class TestErrorHandling_Python(unittest.TestCase):
+    module = py_heapq
+
+class TestErrorHandling_C(TestErrorHandling):
+    module = c_heapq
+
 
 #==============================================================================
 
 
 def test_main(verbose=None):
-    test_classes = [TestHeapPython, TestHeapC, TestErrorHandling]
+    test_classes = [TestHeapPython, TestHeapC, TestErrorHandling_Python,
+                    TestErrorHandling_C]
     test_support.run_unittest(*test_classes)
 
     # verify reference counting

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


More information about the Python-checkins mailing list