Add ProcessPoolAction, update CAP to look only at keywords correctly

This commit is contained in:
2025-05-28 00:58:50 -04:00
parent fb1ffbe9f6
commit f196e38c57
10 changed files with 282 additions and 28 deletions

View File

@ -0,0 +1,25 @@
import pytest
from falyx.action import Action, ActionFactoryAction, ChainedAction
def make_chain(value) -> ChainedAction:
return ChainedAction(
"test_chain",
[
Action("action1", lambda: value + "_1"),
Action("action2", lambda: value + "_2"),
],
return_list=True,
)
@pytest.mark.asyncio
async def test_action_factory_action():
action = ActionFactoryAction(
name="test_action", factory=make_chain, args=("test_value",)
)
result = await action()
assert result == ["test_value_1", "test_value_2"]