From f8c069132e7c3d99b3d3e1fedb24e9e765417b9b Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 7 Mar 2025 17:04:03 -0800 Subject: [PATCH] fix: Add mdstream mock to resolve WholeFileCoder test failure --- tests/basic/test_reasoning.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/basic/test_reasoning.py b/tests/basic/test_reasoning.py index 4ad9fe997..df494b570 100644 --- a/tests/basic/test_reasoning.py +++ b/tests/basic/test_reasoning.py @@ -121,6 +121,9 @@ class TestReasoning(unittest.TestCase): # Mock the model's send_completion to return the hash and completion with patch.object(model, "send_completion", return_value=(mock_hash, chunks)): + # Set mdstream directly on the coder object + coder.mdstream = mock_mdstream + # Call send with a simple message messages = [{"role": "user", "content": "test prompt"}] list(coder.send(messages))