Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a03397-4d51-7fd1-8ff2-946eb22ea2bc
This commit is contained in:
parent
788eb8e2ed
commit
92881b6b56
35 changed files with 1206 additions and 806 deletions
|
|
@ -18,9 +18,11 @@ def test_root_help_exposes_repository_shorthand_and_command(capsys):
|
|||
main(["--help"])
|
||||
assert exc.value.code == 0
|
||||
output = capsys.readouterr().out
|
||||
assert "tamq [--detach] [--command COMMAND] [--mode MODE] REPO" in output
|
||||
assert "tamq [--detach] [--command COMMAND] [--mode MODE]" in output
|
||||
assert "With no --command" in output
|
||||
assert "@TARGET: MESSAGE" in output
|
||||
assert "To:TARGET: MESSAGE" in output
|
||||
assert "Cmd: mode=trigger" in output
|
||||
assert "[--maxmsg N] [--maxin N] [--maxout N]" in output
|
||||
|
||||
|
||||
def test_attach_delegates_to_tmux(monkeypatch):
|
||||
|
|
@ -46,12 +48,15 @@ def test_start_parser_supports_command_and_cmd_alias():
|
|||
neutral = parser.parse_args(["start", "a", "b"])
|
||||
inbox_only = parser.parse_args(["start", "--no-display", "a"])
|
||||
pushy = parser.parse_args(["start", "--mode", "pushy", "a"])
|
||||
trigger = parser.parse_args(["start", "--mode", "trigger", "--maxmsg", "3", "a"])
|
||||
assert canonical.initial_command == "codex --quiet"
|
||||
assert canonical.repos == ["a", "b"]
|
||||
assert compatibility.initial_command == "claude"
|
||||
assert neutral.initial_command is None
|
||||
assert inbox_only.no_display is True
|
||||
assert pushy.mode == "pushy"
|
||||
assert trigger.mode == "trigger"
|
||||
assert trigger.maxmsg == 3
|
||||
|
||||
|
||||
def test_repository_first_and_command_first_start_shorthand():
|
||||
|
|
@ -82,6 +87,9 @@ def test_repository_first_and_command_first_start_shorthand():
|
|||
"--mode=pushy",
|
||||
"flex-auth",
|
||||
]
|
||||
assert normalize_argv(["--maxmsg=3", "flex-auth"]) == [
|
||||
"start", "--maxmsg=3", "flex-auth"
|
||||
]
|
||||
assert normalize_argv(["status"]) == ["status"]
|
||||
assert normalize_argv(["--verbose", "flex-auth", "audit-core"]) == [
|
||||
"--verbose",
|
||||
|
|
@ -173,8 +181,9 @@ def test_registration_failure_rolls_back_created_windows(monkeypatch, capsys):
|
|||
def preflight(self, repos, command):
|
||||
return "plan"
|
||||
|
||||
def ensure_plan(self, plan, *, tap=True):
|
||||
assert tap is False
|
||||
def ensure_plan(self, plan, *, tap=True, tap_limits=None):
|
||||
assert tap is True
|
||||
assert tap_limits == (8, 1024, 32768)
|
||||
return endpoint
|
||||
|
||||
def rollback(self, value):
|
||||
|
|
@ -212,8 +221,9 @@ def test_pushy_mode_registers_explicit_delivery_mode(monkeypatch, capsys):
|
|||
assert command == "codex"
|
||||
return "plan"
|
||||
|
||||
def ensure_plan(self, plan, *, tap=True):
|
||||
def ensure_plan(self, plan, *, tap=True, tap_limits=None):
|
||||
assert tap is True
|
||||
assert tap_limits == (8, 1024, 32768)
|
||||
return endpoint
|
||||
|
||||
def rollback(self, value):
|
||||
|
|
@ -240,6 +250,7 @@ def test_pushy_mode_registers_explicit_delivery_mode(monkeypatch, capsys):
|
|||
assert summary["delivery_mode"] == "pushy"
|
||||
assert summary["input_observation_requested"] is True
|
||||
assert requests[0]["delivery_mode"] == "pushy"
|
||||
assert requests[0]["maxmsg"] == 8
|
||||
|
||||
|
||||
def test_tap_requires_explicit_command_and_service(capsys):
|
||||
|
|
@ -255,3 +266,8 @@ def test_tap_requires_explicit_command_and_service(capsys):
|
|||
assert "--tap cannot be combined with --mode" in capsys.readouterr().err
|
||||
assert main(["start", "--no-service", "--mode", "pushy", "a"]) == 2
|
||||
assert "--mode cannot be combined with --no-service" in capsys.readouterr().err
|
||||
|
||||
|
||||
def test_start_rejects_nonpositive_line_limits(capsys):
|
||||
assert main(["start", "--maxmsg", "0", "a"]) == 2
|
||||
assert "maxmsg must be a positive integer" in capsys.readouterr().err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue