File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 8
8
find_external_compartment ,
9
9
is_boundary_type ,
10
10
)
11
+ import logging
11
12
12
13
13
14
def test_find_external_compartment_single (model : Model ) -> None :
@@ -40,6 +41,17 @@ def test_find_external_compartment_multi(model: Model) -> None:
40
41
find_external_compartment (model )
41
42
42
43
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
+
43
55
def test_no_names_or_boundary_reactions (empty_model : Model ) -> None :
44
56
"""Test absence of name or boundary reactions."""
45
57
with pytest .raises (RuntimeError ):
You can’t perform that action at this time.
0 commit comments