Skip to content

Commit

Permalink
Add explicit exceptions
Browse files Browse the repository at this point in the history
Co-authored-by: Moritz E. Beber <midnighter@posteo.net>
  • Loading branch information
hgscott and Midnighter committed Nov 11, 2023
1 parent 2be2d2f commit 3e505ca
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 @@ -158,7 +158,9 @@ def test_detect_energy_generating_cycles(model, met):
main_comp = helpers.find_compartment_id_in_model(model, "c")
try:
helpers.find_met_in_model(model, met, main_comp)[0]
except:
except ValueError:
pytest.skip("Metabolite {} is not in the MetaNetX shortlist.".format(met))
except (RuntimeError, IndexError):
pytest.skip(
"This test has been skipped since metabolite {} could "
"not be found in the model.".format(met)
Expand Down

0 comments on commit 3e505ca

Please sign in to comment.