Skip to content

Commit

Permalink
Fix precision in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gtca committed Oct 13, 2023
1 parent e6da88a commit 617c20d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_anndata.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ def test_multi_group(self, filepath_hdf5):
assert all(adata.obs.group.values == adata.obs.true_group.values)

for sample, value in (
("sample0_groupA", 0.1459154),
("sample7_groupB", -0.1822545),
("sample0_groupA", 0.145915),
("sample7_groupB", -0.182254),
):
si = np.where(adata.obs_names == sample)[0][0]
assert adata.obsm["X_mofa"][si, 0] == pytest.approx(value)
assert adata.obsm["X_mofa"][si, 0] == pytest.approx(value, 1e-5)


if __name__ == "__main__":
Expand Down

0 comments on commit 617c20d

Please sign in to comment.