Skip to content

Commit 55432a5

Browse files
authored
Merge pull request #619 from malariagen/618-bad-random-value
Random error when performing tests
2 parents 57c6d8a + edebc2b commit 55432a5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/anoph/test_pca.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,9 @@ def test_pca_plotting(fixture, api: AnophelesPca):
9393
# PCA parameters.
9494
n_samples = ds.sizes["samples"]
9595
n_snps_available = ds.sizes["variants"]
96-
n_snps = random.randint(1, n_snps_available)
96+
n_snps = random.randint(4, n_snps_available)
9797
# PC3 required for plot_pca_coords_3d()
98+
assert min(n_samples, n_snps) > 3
9899
n_components = random.randint(3, min(n_samples, n_snps))
99100

100101
# Run the PCA.

0 commit comments

Comments
 (0)