Skip to content

Commit bf1b49d

Browse files
ieivanovclaude
andcommitted
test: parametrise test_process_single_position over num_workers/use_threads
Renames the hypothesis strategy from `num_threads` to `num_workers` to match the new public API, and adds a `use_threads` boolean strategy so the test exercises both the ProcessPoolExecutor (default) and ThreadPoolExecutor paths. The old test only covered serial + threads. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 6f33a48 commit bf1b49d

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

tests/ngff/test_ngff_utils.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -737,10 +737,11 @@ def test_match_indices_to_batches(indices, shard_size):
737737
@given(
738738
setup=process_single_position_setup(),
739739
constant=st.integers(min_value=1, max_value=3),
740-
num_threads=st.sampled_from([1, 2]),
740+
num_workers=st.sampled_from([1, 2]),
741+
use_threads=st.booleans(),
741742
)
742743
@settings(max_examples=3, deadline=None)
743-
def test_process_single_position(setup, constant, num_threads):
744+
def test_process_single_position(setup, constant, num_workers, use_threads):
744745
(
745746
position_keys,
746747
channel_names,
@@ -779,7 +780,8 @@ def test_process_single_position(setup, constant, num_threads):
779780
output_channel_indices=channel_indices,
780781
input_time_indices=time_indices,
781782
output_time_indices=time_indices,
782-
num_threads=num_threads,
783+
num_workers=num_workers,
784+
use_threads=use_threads,
783785
**kwargs,
784786
)
785787

0 commit comments

Comments
 (0)