Skip to content

Commit

Permalink
Use find met in model function to check for metanetx IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
hgscott authored and Midnighter committed Nov 11, 2023
1 parent 5150a3a commit ab0a17d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/memote/suite/tests/test_consistency.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

import memote.support.consistency as consistency
import memote.support.consistency_helpers as con_helpers
import memote.support.helpers as helpers
from memote.utils import annotate, get_ids, truncate, wrapper


Expand Down Expand Up @@ -153,7 +154,8 @@ def test_detect_energy_generating_cycles(model, met):
"""
ann = test_detect_energy_generating_cycles.annotation
if met not in model.metabolites:
main_comp = helpers.find_compartment_id_in_model(model, "c")
if helpers.find_met_in_model(model, met, main_comp)[0] is None:
pytest.skip(
"This test has been skipped since metabolite {} could "
"not be found in the model.".format(met)
Expand Down

0 comments on commit ab0a17d

Please sign in to comment.