Some checks failed
tamq-ci / test (push) Failing after 36s
Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a02f34-ead4-7a60-85cd-d7f08e22fa0e
20 lines
881 B
Python
20 lines
881 B
Python
from tamq import tmux
|
|
|
|
|
|
def test_tmux_manager_builds_tap_windows(monkeypatch):
|
|
calls = []
|
|
manager = tmux.TmuxManager("tamq-test")
|
|
monkeypatch.setattr(tmux, "validate_targets", lambda repos: None)
|
|
monkeypatch.setattr(tmux, "repository_paths", lambda: {"a": "/tmp/a", "b": "/tmp/b"})
|
|
def run(*args, check=True):
|
|
calls.append(args)
|
|
if args[:2] == ("list-windows", "-t"):
|
|
return "__tamq_boot"
|
|
if args[:2] == ("display-message", "-p"):
|
|
return "42"
|
|
return ""
|
|
monkeypatch.setattr(manager, "_run", run)
|
|
monkeypatch.setattr(tmux.subprocess, "run", lambda *args, **kwargs: type("R", (), {"returncode": 1})())
|
|
endpoint = manager.ensure(["a", "b"], "codex")
|
|
assert endpoint.endpoint_id == "tmux-amq-42"
|
|
assert any("tamq tap" in " ".join(call) for call in calls if call and call[0] == "send-keys")
|