Files
hermes-agent/tests/tools/test_focus_pane_tool.py
teknium1 5f6b1d251f test: purge low-value tests, lane py17 (495 removed)
Change-detectors, tautologies, source-reading tests, redundant duplicates,
mock-echo tests and dead/unrunnable tests. Per-test rationale in the lane
ledger (category + reason for every removal).
2026-09-23 03:15:26 -07:00

28 lines
617 B
Python

"""Tests for the GUI-surface ``focus_pane`` tool."""
import json
import pytest
from tools import desktop_ui, focus_pane_tool as fp
@pytest.fixture(autouse=True)
def _reset_emitter():
desktop_ui.set_emitter(None)
yield
desktop_ui.set_emitter(None)
@pytest.mark.parametrize("pane", fp.PANES)
def test_emits_pane_reveal(pane):
calls = []
desktop_ui.set_emitter(lambda sid, event, payload: calls.append((event, payload)))
out = json.loads(fp.focus_pane_tool(f" {pane.upper()} "))
assert out == {"success": True, "pane": pane}
assert calls == [("pane.reveal", {"pane": pane})]