From 5765dac7647b1e02aa73a3a7ea02547fad316ec6 Mon Sep 17 00:00:00 2001 From: Zishan Date: Mon, 17 Feb 2025 15:27:11 +0100 Subject: [PATCH] rename anthropic test file names --- ..._call.py => anthropic_test_chat_with_tool_call.py} | 11 ++++++----- ...ll.py => anthropic_test_chat_without_tool_call.py} | 0 2 files changed, 6 insertions(+), 5 deletions(-) rename tests/anthropic/{test_chat_with_tool_call.py => anthropic_test_chat_with_tool_call.py} (97%) rename tests/anthropic/{test_chat_without_tool_call.py => anthropic_test_chat_without_tool_call.py} (100%) diff --git a/tests/anthropic/test_chat_with_tool_call.py b/tests/anthropic/anthropic_test_chat_with_tool_call.py similarity index 97% rename from tests/anthropic/test_chat_with_tool_call.py rename to tests/anthropic/anthropic_test_chat_with_tool_call.py index ece1348..6f22b77 100644 --- a/tests/anthropic/test_chat_with_tool_call.py +++ b/tests/anthropic/anthropic_test_chat_with_tool_call.py @@ -100,7 +100,6 @@ class WeatherAgent: while True: json_data = "" content = [] - response = [] with self.client.messages.stream( tools=[self.get_weather_function], model="claude-3-5-sonnet-20241022", @@ -171,8 +170,8 @@ async def test_chat_completion_without_streaming( queries = [ "What's the weather like in Zurich city?", - # "Tell me the weather for New York", - # "How's the weather in London next week?", + "Tell me the weather for New York", + "How's the weather in London next week?", ] cities = ["zurich", "new york", "london"] # Process each query @@ -189,6 +188,8 @@ async def test_chat_completion_without_streaming( assert response[1].role == "assistant" assert response[1].stop_reason == "end_turn" assert cities[index] in response[1].content[0].text.lower() + + @pytest.mark.skipif(not os.getenv("ANTHROPIC_API_KEY"), reason="No ANTHROPIC_API_KEY set") @@ -200,8 +201,8 @@ async def test_chat_completion_with_streaming( queries = [ "What's the weather like in Zurich city?", - # "Tell me the weather for New York", - # "How's the weather in London next week?", + "Tell me the weather for New York", + "How's the weather in London next week?", ] cities = ["zurich", "new york", "london"] diff --git a/tests/anthropic/test_chat_without_tool_call.py b/tests/anthropic/anthropic_test_chat_without_tool_call.py similarity index 100% rename from tests/anthropic/test_chat_without_tool_call.py rename to tests/anthropic/anthropic_test_chat_without_tool_call.py