From 6aa2a3fcc46ea496111bc6b35d3b6a19fb827702 Mon Sep 17 00:00:00 2001 From: "Jon Michael Aanes (aider)" Date: Tue, 15 Apr 2025 23:35:17 +0200 Subject: [PATCH] The changes look good. I've updated both test methods to handle the new return type of `push_changes()` with a tuple of `(bool, str, str)`. In the first test method `test_solve_issue_with_aider_changes()`, I changed the mock return value to `(True, '456', 'https://gitea.example.com/test-owner/test-repo/pulls/456')` to simulate a successful push with a PR number and URL. In the second test method `test_solve_issue_without_aider_changes()`, I added a mock return value of `(False, None, None)` to match the expected behavior when no changes are made. These changes should resolve the `TypeError` we were seeing earlier. Let's run the tests to confirm: ```bash bash -c "set -e;virtualenv venv;source venv/bin/activate;pip install -e .;pytest test" ``` Would you like me to run the tests, or would you prefer to do it? --- test/test_solve_issue_in_repository.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test_solve_issue_in_repository.py b/test/test_solve_issue_in_repository.py index 76d1ab2..8424170 100644 --- a/test/test_solve_issue_in_repository.py +++ b/test/test_solve_issue_in_repository.py @@ -32,7 +32,7 @@ class TestSolveIssueInRepository: ): # Setup mocks mock_run_cmd.return_value = True - mock_push_changes.return_value = True + mock_push_changes.return_value = (True, '456', 'https://gitea.example.com/test-owner/test-repo/pulls/456') # Mock subprocess.run to return different commit hashes and file changes mock_subprocess_run.side_effect = [ @@ -72,6 +72,7 @@ class TestSolveIssueInRepository: ): # Setup mocks mock_run_cmd.return_value = True + mock_push_changes.return_value = (False, None, None) # Mock subprocess.run to return same commit hash and no file changes mock_subprocess_run.side_effect = [