Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add test for pairwise
  • Loading branch information
eendebakpt committed Feb 4, 2026
commit 88101755c042ca323177f4d91130e7fb02bc9218
9 changes: 8 additions & 1 deletion Lib/test/test_free_threading/test_itertools.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import unittest
from itertools import batched, chain, combinations_with_replacement, cycle, permutations
from itertools import batched, chain, combinations_with_replacement, cycle, pairwise, permutations
from test.support import threading_helper


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

@threading_helper.reap_threads
def test_pairwise(self):
number_of_iterations = 10
for _ in range(number_of_iterations):
it = pairwise(tuple(range(100)))
threading_helper.run_concurrently(work_iterator, nthreads=10, args=[it])

@threading_helper.reap_threads
def test_permutations(self):
number_of_iterations = 6
Expand Down