Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ def get_date():


def assert_tools_simple_stream_content(chat_fun: ChatFun):
from mcp.types import ToolAnnotations
try:
from mcp.types import ToolAnnotations
except ImportError:
pytest.skip("mcp is not installed")
return

chat = chat_fun(system_prompt="Be very terse, not even punctuation.")

Expand Down
6 changes: 5 additions & 1 deletion tests/test_tool_from_mcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,11 @@ def test_mcp_tool_input_schema_conversion(self):

def test_from_mcp_with_annotations(self):
"""Test creating a Tool from MCP tool with annotations."""
from mcp.types import ToolAnnotations
try:
from mcp.types import ToolAnnotations
except ImportError:
pytest.skip("mcp is not installed")
return

mcp_tool = self.create_mock_mcp_tool(
name="dangerous_tool",
Expand Down