Attention une mise à jour du service Gitlab va être effectuée le mardi 30 novembre entre 17h30 et 18h00. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes. Cette mise à jour intermédiaire en version 14.0.12 nous permettra de rapidement pouvoir mettre à votre disposition une version plus récente.

Commit 9dca6c71 authored by ysard's avatar ysard
Browse files

Add tests for the command line & the library

parent 379df5c4
......@@ -24,6 +24,10 @@ uninstall: files.txt
cat files.txt | xargs rm -rf
rm files.txt
unit_tests:
@echo Launch unit tests
python2.7 setup.py test
test_register:
python2.7 setup.py register -r https://testpypi.python.org/pypi
......
......@@ -26,7 +26,9 @@
"""Definition of setup function for setuptools module."""
# Standard imports
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
from sys import version_info
__PACKAGE_VERSION__ = "0.1.0"
......@@ -38,6 +40,22 @@ if version_info[0] == 2:
# Require backport of concurrent.futures on Python 2
deps.append("futures")
################################################################################
class PyTest(TestCommand):
"""Call tests with the custom 'python setup.py test' command."""
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = []
def run_tests(self):
import pytest
errno = pytest.main()
sys.exit(errno)
################################################################################
setup(
# Library name & version
......@@ -74,5 +92,9 @@ setup(
'console_scripts': ['cadbiom_cmd = cadbiom_cmd.cadbiom_cmd:main'],
},
install_requires=deps + ["matplotlib", "cadbiom"]
install_requires=deps + ["matplotlib", "cadbiom"],
# Tests
tests_require=['pytest'],
cmdclass={'test': PyTest},
)
# -*- coding: utf-8 -*-
"""Unit tests for solver results"""
#from __future__ import unicode_literals
from __future__ import print_function
# Standard imports
import pytest
import tempfile
# Custom imports
from cadbiom_cmd import solution_search
@pytest.fixture()
def feed_output():
return ['Ax Bx\n'], \
['Ax Bx\n', '% h2 h00\n', '% h3\n', '% h0 h1\n', '% hlast\n'], \
['4\n']
def test_minigraph1(feed_output):
"""Test the obtention of frontier places & timings on Minigraph 1
Output must be:
camp:
Ax Bx
cam complete:
Ax Bx
% h2 h00
% h3
% h0 h1
% hlast
cam step:
4
.. note:: Order of trajectories may change. (h2 h00, h3 vs h2, h3 h00)
.. note:: This test is the equivalent of the following command line:
cadbiom_cmd -vv debug compute_macs mini_test_publi.bcx Px --steps 10
.. note:: The test directory is the temporary sytem folder.
"""
# Create the file model in /tmp/
# Note: prevent the deletion of the file after the close() call
fd_model = tempfile.NamedTemporaryFile(suffix='.bcx', delete=False)
fd_model.write(
"""<model xmlns="http://cadbiom" name="bicluster">
<CSimpleNode name="Ax" xloc="0.156748911466" yloc="0.673568818514"/>
<CSimpleNode name="n1" xloc="0.291727140784" yloc="0.673568818514"/>
<CSimpleNode name="C1" xloc="0.404208998548" yloc="0.618757612668"/>
<CSimpleNode name="n2" xloc="0.405660377359" yloc="0.722289890377"/>
<CSimpleNode name="Px" xloc="0.577083086261" yloc="0.722140333368"/>
<CSimpleNode name="Bx" xloc="0.157474600871" yloc="0.83922046285"/>
<CSimpleNode name="n3" xloc="0.290570367401" yloc="0.803822907245"/>
<CSimpleNode name="n4" xloc="0.292715433748" yloc="0.906099768906"/>
<CSimpleNode name="C2" xloc="0.409124108889" yloc="0.803710739487"/>
<CSimpleNode name="C3" xloc="0.408336298212" yloc="0.906099768906"/>
<transition name="" ori="Ax" ext="n1" event="h00" condition="" action="" fact_ids="[]"/>
<transition name="" ori="n1" ext="C1" event="h0" condition="" action="" fact_ids="[]"/>
<transition name="" ori="n1" ext="n2" event="h1" condition="C2" action="" fact_ids="[]"/>
<transition name="" ori="n2" ext="Px" event="hlast" condition="C1 and not C3" action="" fact_ids="[]"/>
<transition name="" ori="Bx" ext="n3" event="h2" condition="" action="" fact_ids="[]"/>
<transition name="" ori="Bx" ext="n4" event="h4" condition="" action="" fact_ids="[]"/>
<transition name="" ori="n3" ext="C2" event="h3" condition="" action="" fact_ids="[]"/>
<transition name="" ori="n4" ext="C3" event="h5" condition="" action="" fact_ids="[]"/>
</model>"""
)
fd_model.close()
# Build params
# See the docstring for the normal command line in shell context
params = {
'all_macs': False,
'chart_file': fd_model.name, # Filename + path
'combinations': False,
'continue': False,
'final_prop': 'Px',
'input_file': None,
'inv_prop': None,
'output': tempfile.gettempdir() + '/',
'start_prop': None,
'steps': 10,
'verbose': 'debug',
}
# Launch the search of the minimal accessibility condition
solution_search.launch_researchs(params)
with open(fd_model.name[:-4] + "_Px_cam.txt", 'r') as file:
found = [line for line in file]
assert found == feed_output[0]
with open(fd_model.name[:-4] + "_Px_cam_complete.txt", 'r') as file:
found = [line for line in file]
assert found == feed_output[1]
with open(fd_model.name[:-4] + "_Px_cam_step.txt", 'r') as file:
found = [line for line in file]
assert found == feed_output[2]
# -*- coding: utf-8 -*-
"""Unit tests for Python API"""
from __future__ import unicode_literals
from __future__ import print_function
# Standard imports
import pytest
@pytest.fixture()
def feed_logical_formula():
frontier_places = {tuple(('A', 'B')), tuple(('AB', 'CD'))}
return frontier_places
def test_make_logical_formula(feed_logical_formula):
from cadbiom_cmd.solution_search import make_logical_formula
found = make_logical_formula(feed_logical_formula, None)
assert found == "not(((AB and CD) or (A and B)))"
found = make_logical_formula(feed_logical_formula, 'START_PROP')
assert found == "START_PROP and (not(((AB and CD) or (A and B))))"
# -*- coding: utf-8 -*-
"""Unit tests for Python API"""
from __future__ import unicode_literals
from __future__ import print_function
# Library imports
from cadbiom.models.biosignal.translators.gt_visitors import compile_cond
from cadbiom.models.guard_transitions.analyser.ana_visitors import TableVisitor
from cadbiom.models.biosignal.sig_expr import *
# Standard imports
import pytest
@pytest.fixture()
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']]),
}
return conditions
def test_rec_tree(feed_conditions):
from cadbiom_cmd.solution_repr import rec, Reporter
# Error Reporter
err = Reporter()
tvi = TableVisitor(err)
symb_tab = tvi.tab_symb
for condition, solution in feed_conditions.items():
inhibitors_nodes, paths = solution
# Get tree object from condition string
cond_sexpr = compile_cond(condition, symb_tab, err)
# Get all possible paths from the condition
found_inhibitors = set()
found_paths = rec(cond_sexpr, found_inhibitors)
# print(found_inhibitors)
# print(found_paths)
assert found_paths == paths
assert found_inhibitors == inhibitors_nodes
def test_parse_condition():
from cadbiom_cmd.solution_repr import parse_condition
condition = "((((((STAT4__dimer___JUN_Cbp_active_nucl)or(JUN_FOSNFAT1_c_4_active_nucl))or((STAT5__dimer___active_active_nucl and Elf1)))or(IL2_IL2R_active_intToMb))or(JUN_FOSNFAT1_c_4_active_nucl))or(NFAT1_FOXP3))or(JUN_FOSNFAT1_c_4_active_nucl)"
inhibitors = set()
all_nodes = set(['JUN_FOSNFAT1_c_4_active_nucl', 'FOS_active_p_p_p_p_cy', 'JUN_nucl_gene', 'SRP9', 'ELK1_nucl', 'JUN_active_p_p_nucl', '14_3_3family_BAD_CaM_Ca2PLUS_CalcineurinAalpha_betaB1', 'IL2_glycosylation_exCellRegion', 'JUN_nucl', '14_3_3family', 'ERK1_2', 'STAT5_cy', 'FOS_cy', u'TGFB1__dimer___active_exCellRegion', 'NFAT1_c_4_inactive1_inactive_cy', u'SRF_nucl', 'ERK1_2_active_active_nucl', 'ERK1_2_active_active', 'ELK1_active_p_p_p_p_p_nucl', 'CaM_Ca2PLUS_CalcineurinAalpha_betaB1_active', 'FOS_cy_gene', u'PKCzeta', 'IL2Ralpha_intToMb_gene', 'IL2_IL2Ralpha_beta_gamma_JAK1_LCK_JAK3_active_intToMb', 'IL2Rgamma_JAK3_intToMb', 'STAT5__dimer___active_active_nucl', 'NFAT1_c_4_active_active_nucl', 'IL2Rbeta_JAK1_LCK_intToMb', 'SRP9_gene', 'IL2Ralpha_intToMb', 'BAD_mi', 'FOS_active_p_p_p_p_nucl'])
found_valid_path = parse_condition(condition, all_nodes, inhibitors)
assert found_valid_path == set([('JUN_FOSNFAT1_c_4_active_nucl',)])
assert inhibitors == set()
......@@ -24,6 +24,10 @@ uninstall: files.txt
cat files.txt | xargs rm -rf
rm files.txt
unit_tests:
@echo Launch unit tests
python2.7 setup.py test
test_register:
python2.7 setup.py register -r https://testpypi.python.org/pypi
......
......@@ -29,12 +29,31 @@
"""Definition of setup function for setuptools module."""
# Standard imports
import sys
from distutils import sysconfig
from setuptools import setup, Extension, find_packages
from setuptools.command.test import test as TestCommand
__PACKAGE_VERSION__ = "0.1.0"
__LIBRARY_VERSION__ = "0.1.0"
################################################################################
class PyTest(TestCommand):
"""Call tests with the custom 'python setup.py test' command."""
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = []
def run_tests(self):
import pytest
errno = pytest.main()
sys.exit(errno)
################################################################################
# Delete unwanted flags for C compilation
# Distutils has the lovely feature of providing all the same flags that
# Python was compiled with. The result is that adding extra flags is easy,
......@@ -121,5 +140,9 @@ setup(
ext_modules=modules,
description="Cadbiom library",
long_description=open('README.md').read(),
install_requires=["networkx", "lxml", "pygraphviz", "pycryptosat"]
install_requires=["networkx", "lxml", "pygraphviz", "pycryptosat"],
# Tests
tests_require=['pytest'],
cmdclass={'test': PyTest},
)
# -*- coding: utf-8 -*-
"""Unit tests for C API"""
from __future__ import unicode_literals
from __future__ import print_function
# Standard imports
import pytest
def test_shift_clause():
from _cadbiom import shift_clause
found = shift_clause([42198], 47633)
assert found == [89831]
found = shift_clause([66035, 66037, -66036], 47633)
assert found == [113668, 113670, -113669]
found = shift_clause([66036, -66037], 47633)
assert found == [113669, -113670]
found = shift_clause([55515, 58893, 48355, -48352], 47633)
assert found == [103148, 106526, 95988, -95985]
def test_shift_dynamic():
from _cadbiom import shift_dynamic
found = shift_dynamic([[66035, 66037, -66036],
[66036, -66037],
[55515, 58893, 48355, -48352]], 47633)
assert found == [[113668, 113670, -113669],
[113669, -113670],
[103148, 106526, 95988, -95985]]
################################################################################
def test_get_unshift_code():
from _cadbiom import get_unshift_code
found = get_unshift_code(-1, 47633)
assert found == -1
found = get_unshift_code(50, 47633)
assert found == 50
def test_unflatten():
from _cadbiom import unflatten
found = unflatten(
[66035, 66037, -66036, 55515, 58893, 48355, -48352],
2, #get_shift_step_init
1, # shiftstep
)
assert found == [[1, 1], [1, -1], [-1, 1], [1, 1], [1, 1], [1, -1]]
found = unflatten(
[66035, 66037, -66036, 55515, 58893, 48355, -48352],
1, #get_shift_step_init
1, # shiftstep
)
assert found == [[1], [1], [-1], [1], [1], [1]]
################################################################################
@pytest.fixture()
def feed_forward_code():
class Clause():
def __init__(self, lits):
self.list_of_literals = lits
class Literal():
def __init__(self, name, sign):
self.name = name # string
self.sign = sign # bool
def __repr__(self):
return "name:{}; sign:{}".format(self.name, self.sign)
# Make a Clause with Literals objects
literal_defs = [('Hsp90', True), ('not _lit2', False), ('Hsp90`', False)]
list_of_literals = [Literal(name, sign) for name, sign in literal_defs]
#print(list_of_literals)
clause = Clause(list_of_literals)
var_code_table = \
{'Hsp90': 10,
'not _lit2': 11,
#'Hsp90`': 12, # volontary removed
'NRAMP1_gene': 1,
'PDK1_active_p': 42583,
'EGFR_EGFR_EGF_EGF_GRB2_PAK1_active_intToMb': 2,
'CCL26_exCellRegion_gene': 3,
'_lit3093': 34992,
'_lit25839': 4,
'_lit25838': 5,
'_lit25837': 6,
'_lit25836': 7,
'_lit25835': 8,
}
shift_step = 1
return clause, var_code_table, shift_step
def test_forward_code(feed_forward_code):
from _cadbiom import forward_code
found = forward_code(feed_forward_code[0],
feed_forward_code[1],
feed_forward_code[2])
assert found == [10, -11, -11]
def test_forward_init_dynamic(feed_forward_code):
from _cadbiom import forward_init_dynamic
found = forward_init_dynamic([feed_forward_code[0], feed_forward_code[0]],
feed_forward_code[1],
feed_forward_code[2])
assert found == [[[10, -11, -11], [10, -11, -11]]]
# -*- coding: utf-8 -*-
"""Unit tests for the solvers with raw statements"""
from __future__ import unicode_literals
from __future__ import print_function
# Standard imports
import pytest
# Custom imports
from pycryptosat import Solver
#from pyCryptoMS import CryptoMS
def load_solver(solv,
initial_constraints, final_constraints, dynamic_constraints):
for clause in final_constraints:
solv.add_clause(clause)
for lcl in dynamic_constraints:
for clause in lcl:
solv.add_clause(clause)
for clause in initial_constraints:
solv.add_clause(clause)
@pytest.fixture()
def feed_statement1():
vvars = []#[21, 23]
max_sol = 2
dynamics = [[[-48, 21], [-48, -21], [48, -21, 21], [-14, 3], [-14, 24], [-3, -24, 14], [24, -22], [12, -22], [-24, -12, 22], [-8, 4], [-8, 22], [-4, -22, 8], [20, -14], [20, -8], [14, 8, -20], [-51, 21, 24], [-51, 21, -20], [51, -21], [51, -24, 20], [-40, 14, 13], [40, -14], [40, -13], [13, -17], [-11, -17], [-13, 11, 17], [25, -18], [17, -18], [-25, -17, 18], [-52, 8, 25], [-52, 8, -18], [52, -8], [52, -25, 18], [-34, 18, 7], [34, -18], [34, -7], [-16, 1], [-16, 23], [-1, -23, 16], [-15, 5], [-15, 23], [-5, -23, 15], [10, -16], [10, -15], [16, 15, -10], [-50, 23], [-50, -10], [50, -23, 10], [-9, 2], [-9, 26], [-2, -26, 9], [-53, 16, 26], [-53, 16, -9], [53, -16], [53, -26, 9], [-19, 6], [-19, 27], [-6, -27, 19], [-54, 15, 27], [-54, 15, -19], [54, -15], [54, -27, 19], [-39, 9, 12], [39, -9], [39, -12], [-38, 19, 11], [38, -19], [38, -11], [-1, 23], [-2, 26], [-3, 24], [-4, 24], [-5, 23], [-6, 27]]]
initial = [[-24], [-13], [-25], [-7], [-26], [-27], [-12], [-11]]
final = [[34]]
nb_vars = 54
lintsol = ()
return max_sol, vvars, initial, final, dynamics, nb_vars, lintsol
@pytest.fixture()
def feed_statement2():
vvars = []#[21, 23]
max_sol = 2
dynamics = [[[-48, 21], [-48, -21], [48, -21, 21], [-14, 3], [-14, 24], [-3, -24, 14], [24, -22], [12, -22], [-24, -12, 22], [-8, 4], [-8, 22], [-4, -22, 8], [20, -14], [20, -8], [14, 8, -20], [-51, 21, 24], [-51, 21, -20], [51, -21], [51, -24, 20], [-40, 14, 13], [40, -14], [40, -13], [13, -17], [-11, -17], [-13, 11, 17], [25, -18], [17, -18], [-25, -17, 18], [-52, 8, 25], [-52, 8, -18], [52, -8], [52, -25, 18], [-34, 18, 7], [34, -18], [34, -7], [-16, 1], [-16, 23], [-1, -23, 16], [-15, 5], [-15, 23], [-5, -23, 15], [10, -16], [10, -15], [16, 15, -10], [-50, 23], [-50, -10], [50, -23, 10], [-9, 2], [-9, 26], [-2, -26, 9], [-53, 16, 26], [-53, 16, -9], [53, -16], [53, -26, 9], [-19, 6], [-19, 27], [-6, -27, 19], [-54, 15, 27], [-54, 15, -19], [54, -15], [54, -27, 19], [-39, 9, 12], [39, -9], [39, -12], [-38, 19, 11], [38, -19], [38, -11], [-1, 23], [-2, 26], [-3, 24], [-4, 24], [-5, 23], [-6, 27]], [[-75, 48], [-75, -48], [75, -48, 48], [-41, 30], [-41, 51], [-30, -51, 41], [51, -49], [39, -49], [-51, -39, 49], [-35, 31], [-35, 49], [-31, -49, 35], [47, -41], [47, -35], [41, 35, -47], [-78, 48, 51], [-78, 48, -47], [78, -48], [78, -51, 47], [-67, 41, 40], [67, -41], [67, -40], [40, -44], [-38, -44], [-40, 38, 44], [52, -45], [44, -45], [-52, -44, 45], [-79, 35, 52], [-79, 35, -45], [79, -35], [79, -52, 45], [-61, 45, 34], [61, -45], [61, -34], [-43, 28], [-43, 50], [-28, -50, 43], [-42, 32], [-42, 50], [-32, -50, 42], [37, -43], [37, -42], [43, 42, -37], [-77, 50], [-77, -37], [77, -50, 37], [-36, 29], [-36, 53], [-29, -53, 36], [-80, 43, 53], [-80, 43, -36], [80, -43], [80, -53, 36], [-46, 33], [-46, 54], [-33, -54, 46], [-81, 42, 54], [-81, 42, -46], [81, -42], [81, -54, 46], [-66, 36, 39], [66, -36], [66, -39], [-65, 46, 38], [65, -46], [65, -38], [-28, 50], [-29, 53], [-30, 51], [-31, 51], [-32, 50], [-33, 54]]]
initial = [[-24], [-13], [-25], [-7], [-26], [-27], [-12], [-11]]
final = [[61]]
nb_vars = 81
lintsol = ()
return max_sol, vvars, initial, final, dynamics, nb_vars, lintsol
@pytest.fixture()
def feed_statement3():
vvars = []#[21, 23]
max_sol = 2
dynamics = [[[-48, 21], [-48, -21], [48, -21, 21], [-14, 3], [-14, 24], [-3, -24, 14], [24, -22], [12, -22], [-24, -12, 22], [-8, 4], [-8, 22], [-4, -22, 8], [20, -14], [20, -8], [14, 8, -20], [-51, 21, 24], [-51, 21, -20], [51, -21], [51, -24, 20], [-40, 14, 13], [40, -14], [40, -13], [13, -17], [-11, -17], [-13, 11, 17], [25, -18], [17, -18], [-25, -17, 18], [-52, 8, 25], [-52, 8, -18], [52, -8], [52, -25, 18], [-34, 18, 7], [34, -18], [34, -7], [-16, 1], [-16, 23], [-1, -23, 16], [-15, 5], [-15, 23], [-5, -23, 15], [10, -16], [10, -15], [16, 15, -10], [-50, 23], [-50, -10], [50, -23, 10], [-9, 2], [-9, 26], [-2, -26, 9], [-53, 16, 26], [-53, 16, -9], [53, -16], [53, -26, 9], [-19, 6], [-19, 27], [-6, -27, 19], [-54, 15, 27], [-54, 15, -19], [54, -15], [54, -27, 19], [-39, 9, 12], [39, -9], [39, -12], [-38, 19, 11], [38, -19], [38, -11], [-1, 23], [-2, 26], [-3, 24], [-4, 24], [-5, 23], [-6, 27]], [[-75, 48], [-75, -48], [75, -48, 48], [-41, 30], [-41, 51], [-30, -51, 41], [51, -49], [39, -49], [-51, -39, 49], [-35, 31], [-35, 49], [-31, -49, 35], [47, -41], [47, -35], [41, 35, -47], [-78, 48, 51], [-78, 48, -47], [78, -48], [78, -51, 47], [-67, 41, 40], [67, -41], [67, -40], [40, -44], [-38, -44], [-40, 38, 44], [52, -45], [44, -45], [-52, -44, 45], [-79, 35, 52], [-79, 35, -45], [79, -35], [79, -52, 45], [-61, 45, 34], [61, -45], [61, -34], [-43, 28], [-43, 50], [-28, -50, 43], [-42, 32], [-42, 50], [-32, -50, 42], [37, -43], [37, -42], [43, 42, -37], [-77, 50], [-77, -37], [77, -50, 37], [-36, 29], [-36, 53], [-29, -53, 36], [-80, 43, 53], [-80, 43, -36], [80, -43], [80, -53, 36], [-46, 33], [-46, 54], [-33, -54, 46], [-81, 42, 54], [-81, 42, -46], [81, -42], [81, -54, 46], [-66, 36, 39], [66, -36], [66, -39], [-65, 46, 38], [65, -46], [65, -38], [-28, 50], [-29, 53], [-30, 51], [-31, 51], [-32, 50], [-33, 54]], [[-102, 75], [-102, -75], [102, -75, 75], [-68, 57], [-68, 78], [-57, -78, 68], [78, -76], [66, -76], [-78, -66, 76], [-62, 58], [-62, 76], [-58, -76, 62], [74, -68], [74, -62], [68, 62, -74], [-105, 75, 78], [-105, 75, -74], [105, -75], [105, -78, 74], [-94, 68, 67], [94, -68], [94, -67], [67, -71], [-65, -71], [-67, 65, 71], [79, -72], [71, -72], [-79, -71, 72], [-106, 62, 79], [-106, 62, -72], [106, -62], [106, -79, 72], [-88, 72, 61], [88, -72], [88, -61], [-70, 55], [-70, 77], [-55, -77, 70], [-69, 59], [-69, 77], [-59, -77, 69], [64, -70], [64, -69], [70, 69, -64], [-104, 77], [-104, -64], [104, -77, 64], [-63, 56], [-63, 80], [-56, -80, 63], [-107, 70, 80], [-107, 70, -63], [107, -70], [107, -80, 63], [-73, 60], [-73, 81], [-60, -81, 73], [-108, 69, 81], [-108, 69, -73], [108, -69], [108, -81, 73], [-93, 63, 66], [93, -63], [93, -66], [-92, 73, 65], [92, -73], [92, -65], [-55, 77], [-56, 80], [-57, 78], [-58, 78], [-59, 77], [-60, 81]]]
initial = [[-24], [-13], [-25], [-7], [-26], [-27], [-12], [-11]]
final = [[88]]
nb_vars = 108
lintsol = ()
return max_sol, vvars, initial, final, dynamics, nb_vars, lintsol
@pytest.fixture()
def feed_statement4():
vvars = [21, 23]
max_sol = 2
dynamics = [[[-48, 21], [-48, -21], [48, -21, 21], [-14, 3], [-14, 24], [-3, -24, 14], [24, -22], [12, -22], [-24, -12, 22], [-8, 4], [-8, 22], [-4, -22, 8], [20, -14], [20, -8], [14, 8, -20], [-51, 21, 24], [-51, 21, -20], [51, -21], [51, -24, 20], [-40, 14, 13], [40, -14], [40, -13], [13, -17], [-11, -17], [-13, 11, 17], [25, -18], [17, -18], [-25, -17, 18], [-52, 8, 25], [-52, 8, -18], [52, -8], [52, -25, 18], [-34, 18, 7], [34, -18], [34, -7], [-16, 1], [-16, 23], [-1, -23, 16], [-15, 5], [-15, 23], [-5, -23, 15], [10, -16], [10, -15], [16, 15, -10], [-50, 23], [-50, -10], [50, -23, 10], [-9, 2], [-9, 26], [-2, -26, 9], [-53, 16, 26], [-53, 16, -9], [53, -16], [53, -26, 9], [-19, 6], [-19, 27], [-6, -27, 19], [-54, 15, 27], [-54, 15, -19], [54, -15], [54, -27, 19], [-39, 9, 12], [39, -9], [39, -12], [-38, 19, 11], [38, -19], [38, -11], [-1, 23], [-2, 26], [-3, 24], [-4, 24], [-5, 23], [-6, 27]], [[-75, 48], [-75, -48], [75, -48, 48], [-41, 30], [-41, 51], [-30, -51, 41], [51, -49], [39, -49], [-51, -39, 49], [-35, 31], [-35, 49], [-31, -49, 35], [47, -41], [47, -35], [41, 35, -47], [-78, 48, 51], [-78, 48, -47], [78, -48], [78, -51, 47], [-67, 41, 40], [67, -41], [67, -40], [40, -44], [-38, -44], [-40, 38, 44], [52, -45], [44, -45], [-52, -44, 45], [-79, 35, 52], [-79, 35, -45], [79, -35], [79, -52, 45], [-61, 45, 34], [61, -45], [61, -34], [-43, 28], [-43, 50], [-28, -50, 43], [-42, 32], [-42, 50], [-32, -50, 42], [37, -43], [37, -42], [43, 42, -37], [-77, 50], [-77, -37], [77, -50, 37], [-36, 29], [-36, 53], [-29, -53, 36], [-80, 43, 53], [-80, 43, -36], [80, -43], [80, -53, 36], [-46, 33], [-46, 54], [-33, -54, 46], [-81, 42, 54], [-81, 42, -46], [81, -42], [81, -54, 46], [-66, 36, 39], [66, -36], [66, -39], [-65, 46, 38], [65, -46], [65, -38], [-28, 50], [-29, 53], [-30, 51], [-31, 51], [-32, 50], [-33, 54]], [[-102, 75], [-102, -75], [102, -75, 75], [-68, 57], [-68, 78], [-57, -78, 68], [78, -76], [66, -76], [-78, -66, 76], [-62, 58], [-62, 76], [-58, -76, 62], [74, -68], [74, -62], [68, 62, -74], [-105, 75, 78], [-105, 75, -74], [105, -75], [105, -78, 74], [-94, 68, 67], [94, -68], [94, -67], [67, -71], [-65, -71], [-67, 65, 71], [79, -72], [71, -72], [-79, -71, 72], [-106, 62, 79], [-106, 62, -72], [106, -62], [106, -79, 72], [-88, 72, 61], [88, -72], [88, -61], [-70, 55], [-70, 77], [-55, -77, 70], [-69, 59], [-69, 77], [-59, -77, 69], [64, -70], [64, -69], [70, 69, -64], [-104, 77], [-104, -64], [104, -77, 64], [-63, 56], [-63, 80], [-56, -80, 63], [-107, 70, 80], [-107, 70, -63], [107, -70], [107, -80, 63], [-73, 60], [-73, 81], [-60, -81, 73], [-108, 69, 81], [-108, 69, -73], [108, -69], [108, -81, 73], [-93, 63, 66], [93, -63], [93, -66], [-92, 73, 65], [92, -73], [92, -65], [-55, 77], [-56, 80], [-57, 78], [-58, 78], [-59, 77], [-60, 81]], [[-129, 102], [-129, -102], [129, -102, 102], [-95, 84], [-95, 105], [-84, -105, 95], [105, -103], [93, -103], [-105, -93, 103], [-89, 85], [-89, 103], [-85, -103, 89], [101, -95], [101, -89], [95, 89, -101], [-132, 102, 105], [-132, 102, -101], [132, -102], [132, -105, 101], [-121, 95, 94], [121, -95], [121, -94], [94, -98], [-92, -98], [-94, 92, 98], [106, -99], [98, -99], [-106, -98, 99], [-133, 89, 106], [-133, 89, -99], [133, -89], [133, -106, 99], [-115, 99, 88], [115, -99], [115, -88], [-97, 82], [-97, 104], [-82, -104, 97], [-96, 86], [-96, 104], [-86, -104, 96], [91, -97], [91, -96], [97, 96, -91], [-131, 104], [-131, -91], [131, -104, 91], [-90, 83], [-90, 107], [-83, -107, 90], [-134, 97, 107], [-134, 97, -90], [134, -97], [134, -107, 90], [-100, 87], [-100, 108], [-87, -108, 100], [-135, <