mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Some tests were incorrectly marked as C specific.
This commit is contained in:
parent
313fa9d365
commit
fd69abb358
1 changed files with 9 additions and 3 deletions
|
@ -308,8 +308,7 @@ def L(seqn):
|
||||||
return chain(map(lambda x:x, R(Ig(G(seqn)))))
|
return chain(map(lambda x:x, R(Ig(G(seqn)))))
|
||||||
|
|
||||||
class TestErrorHandling(unittest.TestCase):
|
class TestErrorHandling(unittest.TestCase):
|
||||||
# only for C implementation
|
module = None
|
||||||
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):
|
||||||
|
@ -359,12 +358,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 TestErrorHandlingPython(TestErrorHandling):
|
||||||
|
module = py_heapq
|
||||||
|
|
||||||
|
class TestErrorHandlingC(TestErrorHandling):
|
||||||
|
module = c_heapq
|
||||||
|
|
||||||
|
|
||||||
#==============================================================================
|
#==============================================================================
|
||||||
|
|
||||||
|
|
||||||
def test_main(verbose=None):
|
def test_main(verbose=None):
|
||||||
test_classes = [TestHeapPython, TestHeapC, TestErrorHandling]
|
test_classes = [TestHeapPython, TestHeapC, TestErrorHandlingPython,
|
||||||
|
TestErrorHandlingC]
|
||||||
support.run_unittest(*test_classes)
|
support.run_unittest(*test_classes)
|
||||||
|
|
||||||
# verify reference counting
|
# verify reference counting
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue