From 82df218bcb71ad87825a4bbc631915328c9746b1 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 7 Mar 2025 16:52:49 -0800 Subject: [PATCH] test: Update test_reasoning to use generator and print partial response --- tests/basic/test_reasoning.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/basic/test_reasoning.py b/tests/basic/test_reasoning.py index 555c05b9a..a50a8e999 100644 --- a/tests/basic/test_reasoning.py +++ b/tests/basic/test_reasoning.py @@ -33,15 +33,17 @@ class TestReasoning(unittest.TestCase): with patch.object(model, "send_completion", return_value=mock_completion): # Call send with a simple message messages = [{"role": "user", "content": "test prompt"}] - coder.send(messages) + list(coder.send(messages)) # Format the response as it would happen in the normal flow - coder.partial_response_content = mock_completion.content - coder.partial_response_reasoning_content = mock_completion.reasoning_content - output = coder.get_multi_response_content_in_progress(final=True) + #coder.partial_response_content = mock_completion.content + #coder.partial_response_reasoning_content = mock_completion.reasoning_content + #output = coder.get_multi_response_content_in_progress(final=True) # Manually call ai_output to simulate the normal flow - coder.io.ai_output(output) + #coder.io.ai_output(output) + + print(coder.partial_response_content) # Now verify ai_output was called with the right content io.ai_output.assert_called_once()