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

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
grst committed Nov 28, 2023
1 parent 4109db9 commit 9aabb7a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_de.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from pydeseq2.utils import load_example_data

import multi_condition_comparisions
from multi_condition_comparisions.tl.de import BaseMethod
from multi_condition_comparisions.tl.de import BaseMethod, StatsmodelsDE


def test_package_has_version():
Expand All @@ -28,11 +28,11 @@ def test_adata():
return ad.AnnData(X=counts, obs=metadata)


@pytest.param("method_class", [])
def test_de(method_class: BaseMethod):
@pytest.mark.parametrize("method_class", [StatsmodelsDE])
def test_de(test_adata, method_class: BaseMethod):
"""Check that the method can be initialized and fitted and that the test_contrast
method returns a dataframe with the correct number of rows"""
method = method_class(adata=test_adata, design="~condition")
method.fit()
res_df = method.test_contrast(np.array([0, 1]))
res_df = method.test_contrasts(np.array([0, 1]))
assert len(res_df) == test_adata.n_vars

0 comments on commit 9aabb7a

Please sign in to comment.