Skip to content

Commit 6492f2f

Browse files
committed
add test
1 parent e5fb151 commit 6492f2f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Lib/test/test_free_threading/test_itertools.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import unittest
2-
from itertools import batched, chain, combinations_with_replacement, cycle, permutations
2+
from itertools import batched, chain, combinations_with_replacement, cycle, islice, permutations
33
from test.support import threading_helper
44

55

@@ -48,6 +48,13 @@ def test_combinations_with_replacement(self):
4848
it = combinations_with_replacement(tuple(range(2)), 2)
4949
threading_helper.run_concurrently(work_iterator, nthreads=6, args=[it])
5050

51+
@threading_helper.reap_threads
52+
def test_islice(self):
53+
number_of_iterations = 6
54+
for _ in range(number_of_iterations):
55+
it = islice(tuple(range(10)), 1, 8, 2)
56+
threading_helper.run_concurrently(work_iterator, nthreads=10, args=[it])
57+
5158
@threading_helper.reap_threads
5259
def test_permutations(self):
5360
number_of_iterations = 6

0 commit comments

Comments
 (0)