diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2011-05-09 04:20:47 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2011-05-09 04:20:47 (GMT) |
commit | fd69abb3583055f79f933e604039b110b71d7dfe (patch) | |
tree | 401039f81afe1fce2e6b9e0f72d6f04d95213e75 /Lib/test/test_heapq.py | |
parent | 313fa9d3651a5edab0d8f0f3b41720818b80c19d (diff) | |
download | cpython-fd69abb3583055f79f933e604039b110b71d7dfe.zip cpython-fd69abb3583055f79f933e604039b110b71d7dfe.tar.gz cpython-fd69abb3583055f79f933e604039b110b71d7dfe.tar.bz2 |
Some tests were incorrectly marked as C specific.
Diffstat (limited to 'Lib/test/test_heapq.py')
-rw-r--r-- | 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 index b41458b..327a64d 100644 --- a/Lib/test/test_heapq.py +++ b/Lib/test/test_heapq.py @@ -308,8 +308,7 @@ def L(seqn): 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 @@ class TestErrorHandling(unittest.TestCase): 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 |