Skip to content

Commit

Permalink
Add test for reversible flux AMR generation
Browse files Browse the repository at this point in the history
  • Loading branch information
bgyori committed Sep 23, 2024
1 parent 5a1ed3c commit cc9fb51
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/test_metamodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,3 +263,17 @@ def test_initial_expression_float():
init = Initial(concept=Concept(name='x'), expression=1)
assert isinstance(init.expression, SympyExprStr)
assert isinstance(init.expression.args[0], sympy.Expr)


def test_reversible_flux():
from mira.modeling import Model
from mira.modeling.amr.petrinet import template_model_to_petrinet_json
t = ReversibleFlux(
left=[Concept(name='x')],
right=[Concept(name='y')],
)
# Make sure we can export to AMR
tm = TemplateModel(templates=[t])
model = Model(tm)
amr = template_model_to_petrinet_json(tm)

0 comments on commit cc9fb51

Please sign in to comment.