feat(core): advance options/state handling and workflow execution integration
- extend OptionsManager to support multi-namespace option resolution and toggling - integrate OptionsManager more deeply across Action, ChainedAction, and ActionGroup - propagate shared runtime configuration through execution layers - refine action composition model (sequential + parallel execution semantics) - improve lifecycle consistency across BaseAction, Action, ChainedAction, and ActionGroup - begin aligning execution flow with centralized context and options handling wip: routing and root option parsing behavior still in progress
This commit is contained in:
28
tests/test_actions/test_chained_action_empty.py
Normal file
28
tests/test_actions/test_chained_action_empty.py
Normal file
@@ -0,0 +1,28 @@
|
||||
import pytest
|
||||
|
||||
from falyx.action import ChainedAction
|
||||
from falyx.exceptions import EmptyChainError
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_chained_action_raises_empty_chain_error_when_no_actions():
|
||||
"""A ChainedAction with no actions should raise an EmptyChainError immediately."""
|
||||
chain = ChainedAction(name="empty_chain", actions=[])
|
||||
|
||||
with pytest.raises(EmptyChainError) as exc_info:
|
||||
await chain()
|
||||
|
||||
assert "No actions to execute." in str(exc_info.value)
|
||||
assert "empty_chain" in str(exc_info.value)
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_chained_action_raises_empty_chain_error_when_actions_are_none():
|
||||
"""A ChainedAction with None as actions should raise an EmptyChainError immediately."""
|
||||
chain = ChainedAction(name="none_chain", actions=None)
|
||||
|
||||
with pytest.raises(EmptyChainError) as exc_info:
|
||||
await chain()
|
||||
|
||||
assert "No actions to execute." in str(exc_info.value)
|
||||
assert "none_chain" in str(exc_info.value)
|
||||
Reference in New Issue
Block a user