mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Revert a premature patch for issue #14010 (changeset 846bd418aee5).
This commit is contained in:
commit
ee57f159af
6 changed files with 14 additions and 224 deletions
|
@ -1564,40 +1564,8 @@ class TestSorted(unittest.TestCase):
|
|||
data = 'The quick Brown fox Jumped over The lazy Dog'.split()
|
||||
self.assertRaises(TypeError, sorted, data, None, lambda x,y: 0)
|
||||
|
||||
class TestRecursionLimit(unittest.TestCase):
|
||||
# Issue #14010
|
||||
recursionlimit = sys.getrecursionlimit()
|
||||
|
||||
def test_filter(self):
|
||||
it = (0, 1)
|
||||
for _ in range(self.recursionlimit):
|
||||
it = filter(bool, it)
|
||||
with self.assertRaises(RuntimeError):
|
||||
for _ in it:
|
||||
pass
|
||||
del it
|
||||
|
||||
def test_map(self):
|
||||
it = (0, 1)
|
||||
for _ in range(self.recursionlimit):
|
||||
it = map(int, it)
|
||||
with self.assertRaises(RuntimeError):
|
||||
for _ in it:
|
||||
pass
|
||||
del it
|
||||
|
||||
def test_zip(self):
|
||||
it = (0, 1)
|
||||
for _ in range(self.recursionlimit):
|
||||
it = zip(it)
|
||||
with self.assertRaises(RuntimeError):
|
||||
for _ in it:
|
||||
pass
|
||||
del it
|
||||
|
||||
|
||||
def test_main(verbose=None):
|
||||
test_classes = (BuiltinTest, TestSorted, TestRecursionLimit)
|
||||
test_classes = (BuiltinTest, TestSorted)
|
||||
|
||||
run_unittest(*test_classes)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue