Skip to content

Commit

Permalink
refactor: move equilibrator test to another module
Browse files Browse the repository at this point in the history
  • Loading branch information
carrascomj committed Dec 19, 2019
1 parent 3eb3f06 commit 2f256de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion tests/conftest.py → tests/equilibrator/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
"""

import pytest
import sys


if sys.version_info < (3, 6):
collect_ignore = ["test_equilibrator.py"]
pytest.xfail("equilibrator-cache requires Python version >= 3.6")
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@

# Load the cobra_model
cobra_model = pytfa.io.import_matlab_model(
this_directory + "/../models/small_ecoli.mat"
this_directory + "/../../models/small_ecoli.mat"
)
cobra_model.optimizer = "glpk"
tmodel = None


# previous version aren't compatible for the required equlibrator_cache version
# this annotation is not necessary since this file shoud be ignored in the test
# collection phase for previous versions, but it makes it more clear.
# this annotation is not necessary since this file shoud be marked as failed in
# confest.py for previous versions, but it makes it more clear.
@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires >= python3.6")
def test_load_with_equi_thermo():
"""Build thermo data structure with equilibrator."""
Expand All @@ -30,7 +30,7 @@ def test_load_with_equi_thermo():
met.annotation["seed.compound"] = met.annotation["seed_id"]
thermo_data = build_thermo_from_equilibrator(cobra_model)
tmodel = pytfa.ThermoModel(thermo_data, cobra_model)
tmodel.solver = 'optlang-glpk'
tmodel.solver = "optlang-glpk"


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires >= python3.6")
Expand Down

0 comments on commit 2f256de

Please sign in to comment.