Skip to content

Commit ff6ad1d

Browse files
committed
fixed tests
1 parent 094227d commit ff6ad1d

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

speos/tests/test_postprocessor.py

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import os
88

99
NODATA = int(os.getenv('NODATA', '1'))
10-
print(NODATA)
1110

1211
class PostProcessorTestNoData(TestSetup):
1312
def setUp(self):
@@ -98,19 +97,6 @@ def test_random_overlap_fast_faster_than_descriptive(self):
9897
descriptive = timeit.timeit(lambda: pp.get_random_overlap(eligible_genes, kept_genes, algorithm="descriptive"), number=3)
9998
self.assertLess(fast, descriptive)
10099

101-
def test_dge_missing_phenotype(self):
102-
103-
config = self.config.copy()
104-
config.input.tag = "autism"
105-
106-
pp = PostProcessor(config, translation_table=self.translation_table_path)
107-
108-
with open(self.test_outer_results, "r") as file:
109-
outer_results = json.load(file)
110-
111-
pp.outer_result = outer_results
112-
113-
self.assertIsNone(pp.dge(self.results_file))
114100

115101
def test_contingency_table(self):
116102
import numpy as np
@@ -214,6 +200,21 @@ def test_goea(self):
214200

215201
self.pp.go_enrichment(self.results_file)
216202

203+
204+
def test_dge_missing_phenotype(self):
205+
206+
config = self.config.copy()
207+
config.input.tag = "autism"
208+
209+
pp = PostProcessor(config, translation_table=self.translation_table_path)
210+
211+
with open(self.test_outer_results, "r") as file:
212+
outer_results = json.load(file)
213+
214+
pp.outer_result = outer_results
215+
216+
self.assertIsNone(pp.dge(self.results_file))
217+
217218

218219

219220

speos/tests/test_preprocessor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ def test_dummy_xswap_directed(self):
626626
def test_dummy_metrics(self):
627627
gwasmappings = self.gwasmapper.get_mappings(tags="dummy", fields="name")
628628
adjacencies = self.adjacencymapper.get_mappings(tags="DummyDirectedGraph", fields="name")
629-
preprocessor = PreProcessor(self.config, gwasmappings, adjacencies)
629+
preprocessor = PreProcessor(self.config, gwasmappings, adjacencies, **self.prepro_kwargs)
630630
preprocessor.build_graph()
631631

632632
metrics = preprocessor.get_metrics()

0 commit comments

Comments
 (0)