diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-04-06 19:55:12 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-04-06 19:55:12 (GMT) |
commit | ee57f159afcba5aeca24a064a114ab441419a820 (patch) | |
tree | e950a43a52d0e87bbaad971078fabdb036c21041 /Lib/test/test_itertools.py | |
parent | 710b5f0b2452accf3495556b8bdc614699e6f544 (diff) | |
parent | 278d03bd66e40d57168ff66c6fb79eae599a784d (diff) | |
download | cpython-ee57f159afcba5aeca24a064a114ab441419a820.zip cpython-ee57f159afcba5aeca24a064a114ab441419a820.tar.gz cpython-ee57f159afcba5aeca24a064a114ab441419a820.tar.bz2 |
Revert a premature patch for issue #14010 (changeset 846bd418aee5).
Diffstat (limited to 'Lib/test/test_itertools.py')
-rw-r--r-- | Lib/test/test_itertools.py | 117 |
1 files changed, 1 insertions, 116 deletions
diff --git a/Lib/test/test_itertools.py b/Lib/test/test_itertools.py index 2a395b5..fdf7984 100644 --- a/Lib/test/test_itertools.py +++ b/Lib/test/test_itertools.py @@ -1808,121 +1808,6 @@ class SubclassWithKwargsTest(unittest.TestCase): self.assertNotIn("does not take keyword arguments", err.args[0]) -class TestRecursionLimit(unittest.TestCase): - # Issue #14010 - recursionlimit = sys.getrecursionlimit() - - def test_accumulate(self): - it = (0, 1) - for _ in range(self.recursionlimit): - it = accumulate(it) - with self.assertRaises(RuntimeError): - for _ in it: - pass - del it - - def test_chain(self): - it = (0, 1) - for _ in range(self.recursionlimit): - it = chain(it, ()) - with self.assertRaises(RuntimeError): - for _ in it: - pass - del it - - def test_compress(self): - data = (0, 1) - selectors = (True, True) - it = data - for _ in range(self.recursionlimit): - it = compress(it, selectors) - with self.assertRaises(RuntimeError): - for _ in it: - pass - del it - - it = selectors - for _ in range(self.recursionlimit): - it = compress(data, it) - with self.assertRaises(RuntimeError): - for _ in it: - pass - del it - - def test_cycle(self): - it = (0, 1) - for _ in range(self.recursionlimit): - it = cycle(it) - with self.assertRaises(RuntimeError): - for _ in range(3): - next(it) - del it - - def test_dropwhile(self): - it = (0, 1, 0) - for _ in range(self.recursionlimit): - it = dropwhile(bool, it) - with self.assertRaises(RuntimeError): - for _ in it: - pass - del it - - def test_filterfalse(self): - it = (0, 1) - for _ in range(self.recursionlimit): - it = filterfalse(bool, it) - with self.assertRaises(RuntimeError): - for _ in it: - pass - del it - - def test_groupby(self): - key = operator.itemgetter(0) - it = ((0, []), (1, [])) - for _ in range(self.recursionlimit): - it = groupby(it, key) - with self.assertRaises(RuntimeError): - for _ in it: - pass - del it - - def test_islice(self): - it = (0, 1) - for _ in range(self.recursionlimit): - it = islice(it, 2) - with self.assertRaises(RuntimeError): - for _ in it: - pass - del it - - def test_starmap(self): - it = 'ab' - for _ in range(self.recursionlimit): - it = starmap(tuple, it) - with self.assertRaises(RuntimeError): - for _ in it: - pass - del it - - def test_takewhile(self): - it = (1, 0) - for _ in range(self.recursionlimit): - it = takewhile(bool, it) - with self.assertRaises(RuntimeError): - for _ in it: - pass - del it - - def test_zip_longest(self): - it = (0, 1) - for _ in range(self.recursionlimit): - it = zip_longest(it) - with self.assertRaises(RuntimeError): - for _ in it: - pass - del it - - libreftest = """ Doctest for examples in the library reference: libitertools.tex @@ -2157,7 +2042,7 @@ __test__ = {'libreftest' : libreftest} def test_main(verbose=None): test_classes = (TestBasicOps, TestVariousIteratorArgs, TestGC, RegressionTests, LengthTransparency, - SubclassWithKwargsTest, TestExamples, TestRecursionLimit) + SubclassWithKwargsTest, TestExamples) support.run_unittest(*test_classes) # verify reference counting |