Skip to content

Commit 6035624

Browse files
fixed further unit tests
1 parent f75c373 commit 6035624

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

diffxpy/unit_test/test_data_types.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ def _test_wald(self, data, sample_description, gene_names=None):
1818
sample_description=sample_description,
1919
gene_names=gene_names,
2020
factor_loc_totest="condition",
21-
formula_loc="~ 1 + condition"
21+
formula_loc="~ 1 + condition",
22+
noise_model="nb",
23+
batch_size=5
2224
)
2325
_ = test.summary()
2426

@@ -28,7 +30,8 @@ def _test_lrt(self, data, sample_description, gene_names=None):
2830
sample_description=sample_description,
2931
gene_names=gene_names,
3032
full_formula_loc="~ 1 + condition",
31-
reduced_formula_loc="~ 1"
33+
reduced_formula_loc="~ 1",
34+
noise_model="nb"
3235
)
3336
_ = test.summary()
3437

@@ -50,7 +53,7 @@ def _test_rank(self, data, sample_description, gene_names=None):
5053
)
5154
_ = test.summary()
5255

53-
def simulate(self, n_cells: int = 20, n_genes: int = 2):
56+
def simulate(self, n_cells: int = 200, n_genes: int = 2):
5457
sim = Simulator(num_observations=n_cells, num_features=n_genes)
5558
sim.generate_sample_description(num_batches=0, num_conditions=0)
5659
sim.generate()

diffxpy/unit_test/test_numeric.py renamed to diffxpy/unit_test/test_numeric_covar.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import diffxpy.api as de
88

99

10-
class TestNumeric(unittest.TestCase):
10+
class TestNumericCovar(unittest.TestCase):
1111

1212
def test(self):
1313
"""
@@ -29,7 +29,7 @@ def test(self):
2929
sample_description["numeric2"] = np.random.random(size=sim.nobs)
3030

3131
test = de.test.wald(
32-
data=sim.x,
32+
data=sim.input_data,
3333
sample_description=sample_description,
3434
formula_loc="~ 1 + condition + numeric1 + numeric2",
3535
formula_scale="~ 1",

0 commit comments

Comments
 (0)