Skip to content

Commit 7c45fe8

Browse files
test is closer to actual use case
1 parent 7c42b2d commit 7c45fe8

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

src/festim/exports/vtx.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,11 @@ def expression(T, **kwargs):
385385

386386
self.override_signature(expression, reactant_names, product_names)
387387

388-
reaction_products = reaction.product if isinstance(reaction.product, list) else [reaction.product]
388+
reaction_products = (
389+
reaction.product
390+
if isinstance(reaction.product, list)
391+
else [reaction.product]
392+
)
389393

390394
super().__init__(
391395
filename=filename,

test/test_vtx.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,8 +483,8 @@ def test_reaction_rate_override_signature():
483483

484484
rr = F.ReactionRate(reaction=reaction, filename="dummy.bp")
485485

486-
def my_expression(x, y):
487-
return x + y
486+
def my_expression(**kwargs):
487+
return kwargs.get("x", 0) + kwargs.get("y", 0)
488488

489489
rr.override_signature(my_expression, ["A"], ["B"])
490490
import inspect

0 commit comments

Comments
 (0)