Skip to content

Commit 9971b84

Browse files
committed
Fix flaky test_g123_calibration by sampling window sizes without replacement
1 parent 7ec5442 commit 9971b84

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

tests/anoph/test_g123.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,7 @@ def test_g123_calibration(fixture, api: AnophelesG123Analysis):
240240

241241
# Set up test parameters.
242242
all_sample_sets = api.sample_sets()["sample_set"].to_list()
243-
window_sizes = np.random.randint(100, 500, size=random.randint(2, 5)).tolist()
244-
window_sizes = sorted([int(x) for x in window_sizes])
243+
window_sizes = sorted(random.sample(range(100, 500), k=random.randint(2, 5)))
245244
g123_params = dict(
246245
contig=random.choice(api.contigs),
247246
sites=random.choice(api.phasing_analysis_ids),

0 commit comments

Comments
 (0)