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:
@@ -2,7 +2,7 @@ import pytest
|
||||
from rich.text import Text
|
||||
|
||||
from falyx import Falyx
|
||||
from falyx.console import console
|
||||
from falyx.exceptions import CommandArgumentError
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@@ -82,17 +82,14 @@ async def test_help_command_by_tag(capsys):
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_help_command_empty_tags(capsys):
|
||||
async def test_help_command_bad_argument(capsys):
|
||||
flx = Falyx()
|
||||
|
||||
async def untagged_command(falyx: Falyx):
|
||||
pass
|
||||
|
||||
flx.add_command(
|
||||
"U", "Untagged Command", untagged_command, help_text="This command has no tags."
|
||||
)
|
||||
await flx.execute_command("H nonexistent_tag")
|
||||
|
||||
captured = capsys.readouterr()
|
||||
text = Text.from_ansi(captured.out)
|
||||
assert "Unexpected positional argument: nonexistent_tag" in text.plain
|
||||
flx.add_command("U", "Untagged Command", untagged_command)
|
||||
with pytest.raises(
|
||||
CommandArgumentError, match="Unexpected positional argument: nonexistent_tag"
|
||||
):
|
||||
await flx.execute_command("H nonexistent_tag")
|
||||
|
||||
Reference in New Issue
Block a user