Skip to content

Commit 55ea5e5

Browse files
committed
add tests
1 parent 2ac84af commit 55ea5e5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/test_medium/test_boundary_types.py

+12
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
find_external_compartment,
99
is_boundary_type,
1010
)
11+
import logging
1112

1213

1314
def test_find_external_compartment_single(model: Model) -> None:
@@ -40,6 +41,17 @@ def test_find_external_compartment_multi(model: Model) -> None:
4041
find_external_compartment(model)
4142

4243

44+
@pytest.mark.parametrize("compartment", ["C_e", "e0"])
45+
def test_find_external_popular_reconstructions(model: Model, compartment, caplog) -> None:
46+
"""Test some additional id formats."""
47+
for ex in model.exchanges:
48+
ex.reactants[0].compartment = compartment
49+
with caplog.at_level(logging.WARNING):
50+
external = find_external_compartment(model)
51+
assert external == compartment
52+
assert "complete nonsense" not in caplog.text
53+
54+
4355
def test_no_names_or_boundary_reactions(empty_model: Model) -> None:
4456
"""Test absence of name or boundary reactions."""
4557
with pytest.raises(RuntimeError):

0 commit comments

Comments
 (0)