Skip to content

Commit

Permalink
Merge pull request #619 from malariagen/618-bad-random-value
Browse files Browse the repository at this point in the history
Random error when performing tests
  • Loading branch information
jonbrenas authored Sep 23, 2024
2 parents 57c6d8a + edebc2b commit 55432a5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/anoph/test_pca.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ def test_pca_plotting(fixture, api: AnophelesPca):
# PCA parameters.
n_samples = ds.sizes["samples"]
n_snps_available = ds.sizes["variants"]
n_snps = random.randint(1, n_snps_available)
n_snps = random.randint(4, n_snps_available)
# PC3 required for plot_pca_coords_3d()
assert min(n_samples, n_snps) > 3
n_components = random.randint(3, min(n_samples, n_snps))

# Run the PCA.
Expand Down

0 comments on commit 55432a5

Please sign in to comment.