Commit 8dd06246 authored by Raymond Hettinger's avatar Raymond Hettinger

Some tests were incorrectly marked as C specific.

parent 21ce8f0d
...@@ -305,8 +305,6 @@ def L(seqn): ...@@ -305,8 +305,6 @@ def L(seqn):
return chain(imap(lambda x:x, R(Ig(G(seqn))))) return chain(imap(lambda x:x, R(Ig(G(seqn)))))
class TestErrorHandling(unittest.TestCase): class TestErrorHandling(unittest.TestCase):
# only for C implementation
module = c_heapq
def test_non_sequence(self): def test_non_sequence(self):
for f in (self.module.heapify, self.module.heappop): for f in (self.module.heapify, self.module.heappop):
...@@ -351,12 +349,19 @@ class TestErrorHandling(unittest.TestCase): ...@@ -351,12 +349,19 @@ class TestErrorHandling(unittest.TestCase):
self.assertRaises(TypeError, f, 2, N(s)) self.assertRaises(TypeError, f, 2, N(s))
self.assertRaises(ZeroDivisionError, f, 2, E(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): def test_main(verbose=None):
test_classes = [TestHeapPython, TestHeapC, TestErrorHandling] test_classes = [TestHeapPython, TestHeapC, TestErrorHandling_Python,
TestErrorHandling_C]
test_support.run_unittest(*test_classes) test_support.run_unittest(*test_classes)
# verify reference counting # verify reference counting
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment