Commit 536506f4 authored by VIGNET Pierre's avatar VIGNET Pierre
Browse files

[tests] Follow renaming of rec() to decompile_condition()

parent 13a8ec67
......@@ -16,21 +16,20 @@ import pytest
def feed_conditions():
# {condition: (inhibitors, paths),}
conditions = \
{
"((((CXCL10_CXCR3_intToMb and not(CCL11_CXCR3_intToMb)))or((CXCL10_CXCR3_intToMb and not(CXCL13_CXCR3_intToMb))))or(CXCL9_11_CXCR3_active_intToMb))or(CXCL4_CXCR3_intToMb)": ({'CCL11_CXCR3_intToMb', 'CXCL13_CXCR3_intToMb'}, [['CXCL10_CXCR3_intToMb', 'CCL11_CXCR3_intToMb'], ['CXCL10_CXCR3_intToMb', 'CXCL13_CXCR3_intToMb'], ['CXCL9_11_CXCR3_active_intToMb'], ['CXCL4_CXCR3_intToMb']]),
"((((A and not(B)))or((A and not(C))))or(D))or(E)": ({'B', 'C'}, [['A', 'B'], ['A', 'C'], ['D'], ['E']]),
"(A and not(B))": ({'B'}, [['A', 'B']]),
"(((((A)or(B))or(C))or(B))or(D))or(E)": (set(), [['A'], ['B'], ['C'], ['B'], ['D'], ['E']]),
"((((not(ATF2_JUND_macroH2A_nucl))or(Fra1_JUND_active_nucl))or(Fra1_JUN_active_nucl))or(TCF4_betacatenin_active_nucl))or(JUN_FOS_active_nucl)": ({'ATF2_JUND_macroH2A_nucl'}, [['ATF2_JUND_macroH2A_nucl'], ['Fra1_JUND_active_nucl'], ['Fra1_JUN_active_nucl'], ['TCF4_betacatenin_active_nucl'], ['JUN_FOS_active_nucl']]),
"((A and B and C)) and (not((D and E and F and G)))": ({'E', 'D', 'G', 'F'}, [['A', 'B', 'C', 'D', 'E', 'F', 'G']]),
"((A))or(not(cortisol))": ({'cortisol'}, [['A'], ['cortisol']]), # Test with an operator in the name of an entity
}
conditions = {
"((((CXCL10_CXCR3_intToMb and not(CCL11_CXCR3_intToMb)))or((CXCL10_CXCR3_intToMb and not(CXCL13_CXCR3_intToMb))))or(CXCL9_11_CXCR3_active_intToMb))or(CXCL4_CXCR3_intToMb)": ({'CCL11_CXCR3_intToMb', 'CXCL13_CXCR3_intToMb'}, [['CXCL10_CXCR3_intToMb', 'CCL11_CXCR3_intToMb'], ['CXCL10_CXCR3_intToMb', 'CXCL13_CXCR3_intToMb'], ['CXCL9_11_CXCR3_active_intToMb'], ['CXCL4_CXCR3_intToMb']]),
"((((A and not(B)))or((A and not(C))))or(D))or(E)": ({'B', 'C'}, [['A', 'B'], ['A', 'C'], ['D'], ['E']]),
"(A and not(B))": ({'B'}, [['A', 'B']]),
"(((((A)or(B))or(C))or(B))or(D))or(E)": (set(), [['A'], ['B'], ['C'], ['B'], ['D'], ['E']]),
"((((not(ATF2_JUND_macroH2A_nucl))or(Fra1_JUND_active_nucl))or(Fra1_JUN_active_nucl))or(TCF4_betacatenin_active_nucl))or(JUN_FOS_active_nucl)": ({'ATF2_JUND_macroH2A_nucl'}, [['ATF2_JUND_macroH2A_nucl'], ['Fra1_JUND_active_nucl'], ['Fra1_JUN_active_nucl'], ['TCF4_betacatenin_active_nucl'], ['JUN_FOS_active_nucl']]),
"((A and B and C)) and (not((D and E and F and G)))": ({'E', 'D', 'G', 'F'}, [['A', 'B', 'C', 'D', 'E', 'F', 'G']]),
"((A))or(not(cortisol))": ({'cortisol'}, [['A'], ['cortisol']]), # Test with an operator in the name of an entity
}
return conditions
def test_rec_tree(feed_conditions):
def test_decompile_condition(feed_conditions):
from cadbiom_cmd.tools.models import decompile_condition, Reporter
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment