gh-93814: Add infinite test for itertools.chain.from_iterable (GH-93815)

fix #93814

Automerge-Triggered-By: GH:rhettinger
This commit is contained in:
Jeong YunWon 2022-06-15 05:45:50 +09:00 committed by GitHub
parent ad90d49887
commit 274769c61c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -180,6 +180,7 @@ class TestBasicOps(unittest.TestCase):
self.assertEqual(list(chain.from_iterable([''])), [])
self.assertEqual(take(4, chain.from_iterable(['abc', 'def'])), list('abcd'))
self.assertRaises(TypeError, list, chain.from_iterable([2, 3]))
self.assertEqual(list(islice(chain.from_iterable(repeat(range(5))), 2)), [0, 1])
def test_chain_reducible(self):
for oper in [copy.deepcopy] + picklecopiers: