Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jkobject committed Sep 4, 2024
1 parent 60cfaba commit 3081835
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from scipy.sparse import csr_matrix
import numpy as np

from grnndata import GRNAnnData
from grnndata import GRNAnnData, utils


def test_base():
Expand All @@ -13,6 +13,7 @@ def test_base():
random_mask = np.random.choice([0, 1], size=random_matrix.shape, p=[0.8, 0.2])
sparse_random_matrix = csr_matrix(random_matrix * random_mask)
grn = GRNAnnData(adata.copy(), grn=sparse_random_matrix)
utils.get_centrality(grn, top_k_to_disp=0)

assert isinstance(grn, GRNAnnData), "grn should be an instance of GRNAnnData"
assert grn.shape == adata.shape, "grn shape should match adata shape"
Expand Down

0 comments on commit 3081835

Please sign in to comment.