Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Commit

Permalink
Fix pairing test -- it didn't actually check pairing
Browse files Browse the repository at this point in the history
  • Loading branch information
grst committed Mar 13, 2024
1 parent d4b0536 commit 37798fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_de.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,13 @@ def _compare_single_group(
x1 = self.adata[comparison_idx, :]
assert np.all(x0.obs["condition"] == "A")
assert np.all(x1.obs["condition"] == "B")
assert np.all(x0.obs["pairing"] == x1.obs["pairing"])
return pd.DataFrame()

rng = np.random.default_rng(seed)
shuffle_adata_idx = rng.permutation(test_adata_minimal.obs_names)
tmp_adata = test_adata_minimal[shuffle_adata_idx, :].copy()

MockSimpleComparison.compare_groups(
tmp_adata, column="condition", baseline="A", groups_to_compare=["B"], paired_by="donor"
tmp_adata, column="condition", baseline="A", groups_to_compare=["B"], paired_by="pairing"
)

0 comments on commit 37798fe

Please sign in to comment.