fix: CI failures — update workflow for uv migration, fix lint and format

- Switch CI install step from `pip install -r requirements.txt` to
  `pip install -e ".[dev]"` since requirements.txt was removed
- Add noqa: E402 to intentionally-late imports in conftest.py
  (HOME must be isolated before mempalace imports)
- Remove unused KnowledgeGraph import in test_knowledge_graph.py
- Apply ruff formatting to test files
This commit is contained in:
Igor Lins e Silva
2026-04-07 17:59:21 -03:00
parent cd8b245fdc
commit 96de23cd97
6 changed files with 55 additions and 26 deletions
+14 -10
View File
@@ -58,11 +58,13 @@ class TestHandleRequest:
def test_unknown_tool(self):
from mempalace.mcp_server import handle_request
resp = handle_request({
"method": "tools/call",
"id": 3,
"params": {"name": "nonexistent_tool", "arguments": {}},
})
resp = handle_request(
{
"method": "tools/call",
"id": 3,
"params": {"name": "nonexistent_tool", "arguments": {}},
}
)
assert resp["error"]["code"] == -32601
def test_unknown_method(self):
@@ -78,11 +80,13 @@ class TestHandleRequest:
# Create a collection so status works
_get_collection(palace_path, create=True)
resp = handle_request({
"method": "tools/call",
"id": 5,
"params": {"name": "mempalace_status", "arguments": {}},
})
resp = handle_request(
{
"method": "tools/call",
"id": 5,
"params": {"name": "mempalace_status", "arguments": {}},
}
)
assert "result" in resp
content = json.loads(resp["result"]["content"][0]["text"])
assert "total_drawers" in content