Skip to content

Commit

Permalink
added test for changing variables but leaving them unchanged in raw
Browse files Browse the repository at this point in the history
  • Loading branch information
noamteyssier committed Apr 28, 2022
1 parent 431da1b commit cbaf7db
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tests/test_adpbulk.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,20 @@ def test_adjusted_raw():
after the original adat changes but the raw does not
"""
adat = build_adat()
mask = np.random.random(adat.shape[1]) < 0.7
mask = np.random.random(SIZE_M) < 0.3
adat = adat[:, mask].copy()

# confirm that `var` shapes are incompatible
assert adat.shape[1] != adat.raw.shape[1]

# tests singular group conditions
for group in adat.obs.columns:
_ = ADPBulk(adat, groupby=group, use_raw=True)
adpb = ADPBulk(adat, groupby=group, use_raw=True)
adpb.fit_transform()

# tests multiple group conditions
_ = ADPBulk(adat, groupby=["cA", "cD"], use_raw=True)
adpb = ADPBulk(adat, groupby=["cA", "cD"], use_raw=True)
adpb.fit_transform()

assert True

Expand Down

0 comments on commit cbaf7db

Please sign in to comment.