summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2011-05-07 14:16:42 -0700
committerRaymond Hettinger <python@rcn.com>2011-05-07 14:16:42 -0700
commit672c2cc8124b7b4b39c0bfc92e62b819c742e642 (patch)
treecb5cbf0e3097dcd75f64b12e59275494cdadbb03
parent1823ad7451885e88a8e44b14975e6e54f131b9d1 (diff)
downloadcpython-672c2cc8124b7b4b39c0bfc92e62b819c742e642.tar.gz
Some tests were incorrectly marked as C specific.
-rw-r--r--Lib/test/test_heapq.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/Lib/test/test_heapq.py b/Lib/test/test_heapq.py
index d5d8c1a179..f0753cf385 100644
--- a/Lib/test/test_heapq.py
+++ b/Lib/test/test_heapq.py
@@ -305,8 +305,6 @@ def L(seqn):
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 @@ class TestErrorHandling(unittest.TestCase):
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