@@ -187,7 +187,9 @@ def test_extract_none_response(self):
187187 def test_extract_usage_from_dict_result_bedrock (self ):
188188 """Test extraction from AWS Bedrock style response."""
189189 agent = Mock ()
190- with patch ("basic_agent_chat_loop.chat_loop.extract_agent_metadata" ) as mock_extract :
190+ with patch (
191+ "basic_agent_chat_loop.chat_loop.extract_agent_metadata"
192+ ) as mock_extract :
191193 mock_extract .return_value = {"model_id" : "test" , "tool_count" : 0 }
192194 chat_loop = ChatLoop (agent , "Test" , "Desc" )
193195
@@ -208,7 +210,9 @@ def test_extract_usage_from_dict_result_bedrock(self):
208210 def test_extract_usage_from_object_anthropic (self ):
209211 """Test extraction from Anthropic style response."""
210212 agent = Mock ()
211- with patch ("basic_agent_chat_loop.chat_loop.extract_agent_metadata" ) as mock_extract :
213+ with patch (
214+ "basic_agent_chat_loop.chat_loop.extract_agent_metadata"
215+ ) as mock_extract :
212216 mock_extract .return_value = {"model_id" : "test" , "tool_count" : 0 }
213217 chat_loop = ChatLoop (agent , "Test" , "Desc" )
214218
@@ -224,7 +228,9 @@ def test_extract_usage_from_object_anthropic(self):
224228 def test_extract_usage_from_dict_usage (self ):
225229 """Test extraction from dict with usage key."""
226230 agent = Mock ()
227- with patch ("basic_agent_chat_loop.chat_loop.extract_agent_metadata" ) as mock_extract :
231+ with patch (
232+ "basic_agent_chat_loop.chat_loop.extract_agent_metadata"
233+ ) as mock_extract :
228234 mock_extract .return_value = {"model_id" : "test" , "tool_count" : 0 }
229235 chat_loop = ChatLoop (agent , "Test" , "Desc" )
230236
@@ -239,7 +245,9 @@ def test_extract_usage_from_dict_usage(self):
239245 def test_extract_usage_prompt_completion_tokens (self ):
240246 """Test extraction with prompt_tokens/completion_tokens names."""
241247 agent = Mock ()
242- with patch ("basic_agent_chat_loop.chat_loop.extract_agent_metadata" ) as mock_extract :
248+ with patch (
249+ "basic_agent_chat_loop.chat_loop.extract_agent_metadata"
250+ ) as mock_extract :
243251 mock_extract .return_value = {"model_id" : "test" , "tool_count" : 0 }
244252 chat_loop = ChatLoop (agent , "Test" , "Desc" )
245253
@@ -257,7 +265,9 @@ def test_extract_usage_prompt_completion_tokens(self):
257265 def test_extract_usage_zero_tokens (self ):
258266 """Test with zero token usage."""
259267 agent = Mock ()
260- with patch ("basic_agent_chat_loop.chat_loop.extract_agent_metadata" ) as mock_extract :
268+ with patch (
269+ "basic_agent_chat_loop.chat_loop.extract_agent_metadata"
270+ ) as mock_extract :
261271 mock_extract .return_value = {"model_id" : "test" , "tool_count" : 0 }
262272 chat_loop = ChatLoop (agent , "Test" , "Desc" )
263273
@@ -271,7 +281,9 @@ def test_extract_usage_zero_tokens(self):
271281 def test_extract_usage_partial_tokens (self ):
272282 """Test with only input tokens."""
273283 agent = Mock ()
274- with patch ("basic_agent_chat_loop.chat_loop.extract_agent_metadata" ) as mock_extract :
284+ with patch (
285+ "basic_agent_chat_loop.chat_loop.extract_agent_metadata"
286+ ) as mock_extract :
275287 mock_extract .return_value = {"model_id" : "test" , "tool_count" : 0 }
276288 chat_loop = ChatLoop (agent , "Test" , "Desc" )
277289
0 commit comments