Skip to content

Commit 597bb31

Browse files
committed
Remove unnecessary test
1 parent 2f2db4c commit 597bb31

File tree

1 file changed

+0
-39
lines changed

1 file changed

+0
-39
lines changed

tests/integrations/pydantic_ai/test_pydantic_ai.py

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2834,42 +2834,3 @@ def multiply_numbers(a: int, b: int) -> int:
28342834
assert tool_span["data"]["gen_ai.tool.name"] == "multiply_numbers"
28352835
assert SPANDATA.GEN_AI_TOOL_DESCRIPTION in tool_span["data"]
28362836
assert "Multiply two numbers" in tool_span["data"][SPANDATA.GEN_AI_TOOL_DESCRIPTION]
2837-
2838-
2839-
@pytest.mark.asyncio
2840-
async def test_tool_without_description_omits_tool_description(
2841-
sentry_init, capture_events
2842-
):
2843-
"""
2844-
Test that execute_tool spans omit tool description when the tool has no docstring.
2845-
"""
2846-
agent = Agent(
2847-
"test",
2848-
name="test_agent",
2849-
system_prompt="You are a helpful test assistant.",
2850-
)
2851-
2852-
@agent.tool_plain
2853-
def no_docs_tool(a: int, b: int) -> int:
2854-
return a + b
2855-
2856-
sentry_init(
2857-
integrations=[PydanticAIIntegration()],
2858-
traces_sample_rate=1.0,
2859-
send_default_pii=True,
2860-
)
2861-
2862-
events = capture_events()
2863-
2864-
result = await agent.run("What is 5 + 3?")
2865-
assert result is not None
2866-
2867-
(transaction,) = events
2868-
spans = transaction["spans"]
2869-
2870-
tool_spans = [s for s in spans if s["op"] == "gen_ai.execute_tool"]
2871-
assert len(tool_spans) >= 1
2872-
2873-
tool_span = tool_spans[0]
2874-
assert tool_span["data"]["gen_ai.tool.name"] == "no_docs_tool"
2875-
assert SPANDATA.GEN_AI_TOOL_DESCRIPTION not in tool_span["data"]

0 commit comments

Comments
 (0)