test(core): Replace pytest.fail with functional assertions in agent tools wiring
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import pytest
|
import pytest
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
import ai_client
|
||||||
|
|
||||||
# Ensure project root is in path
|
# Ensure project root is in path
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
@@ -9,8 +10,11 @@ from ai_client import set_agent_tools, _build_anthropic_tools
|
|||||||
|
|
||||||
def test_set_agent_tools() -> None:
|
def test_set_agent_tools() -> None:
|
||||||
agent_tools = {"read_file": True, "list_directory": False}
|
agent_tools = {"read_file": True, "list_directory": False}
|
||||||
|
# Set cache to verify it gets cleared
|
||||||
|
ai_client._CACHED_ANTHROPIC_TOOLS = [{"name": "dummy"}]
|
||||||
set_agent_tools(agent_tools)
|
set_agent_tools(agent_tools)
|
||||||
pytest.fail("TODO: Implement assertions")
|
assert ai_client._agent_tools == agent_tools
|
||||||
|
assert ai_client._CACHED_ANTHROPIC_TOOLS is None
|
||||||
|
|
||||||
def test_build_anthropic_tools_conversion() -> None:
|
def test_build_anthropic_tools_conversion() -> None:
|
||||||
set_agent_tools({"read_file": True})
|
set_agent_tools({"read_file": True})
|
||||||
|
|||||||
Reference in New Issue
Block a user