chore: 清理敏感信息,完善工程结构和文档

This commit is contained in:
JianFeeeee
2026-04-11 10:54:21 +08:00
parent b33a87d19e
commit 371d5f9ec8
18 changed files with 834 additions and 250 deletions

View File

@ -0,0 +1,33 @@
"""焦点处理器测试"""
import pytest
from graph_memory_tui.handlers.focus_handler import FocusHandler
def test_focus_handler_creation():
"""测试焦点处理器创建"""
handler = FocusHandler()
assert handler is not None
assert handler._current_index == 0
def test_focus_ring():
"""测试焦点循环"""
handler = FocusHandler()
assert len(handler.FOCUS_RING) == 5
assert "input-textarea" in handler.FOCUS_RING
assert "cypher-textarea" in handler.FOCUS_RING
def test_get_current_focus_name():
"""测试获取当前焦点名称"""
handler = FocusHandler()
name = handler.get_current_focus_name()
assert name == "Input"
def test_focus_names_mapping():
"""测试焦点名称映射"""
handler = FocusHandler()
assert handler.FOCUS_NAMES["input-textarea"] == "Input"
assert handler.FOCUS_NAMES["cypher-textarea"] == "Query"