Skip to content

Commit 8810175

Browse files
committed
add test for pairwise
1 parent b6d8aa4 commit 8810175

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, pairwise, 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_pairwise(self):
53+
number_of_iterations = 10
54+
for _ in range(number_of_iterations):
55+
it = pairwise(tuple(range(100)))
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)