Paul Gauthier (aider)
04fff71e73
feat: Add tests for subtree_only
2024-08-06 08:47:39 -03:00
Paul Gauthier
24f2741369
fix: Simplify mocking in test_commands.py
2024-08-03 10:05:52 -03:00
Paul Gauthier (aider)
91219eee30
style: Apply linter formatting to test_commands.py
2024-08-03 10:03:32 -03:00
Paul Gauthier (aider)
c454d9435e
feat: add test for cmd_ask with mocked chat_coder
2024-08-03 10:03:28 -03:00
Paul Gauthier
da3e507ec4
Revert "rename simple_send_with_retries -> send_with_retries"
...
This reverts commit d619edf6e9
.
2024-08-02 10:49:44 -03:00
Paul Gauthier
d619edf6e9
rename simple_send_with_retries -> send_with_retries
2024-08-02 10:35:10 -03:00
Paul Gauthier
008ae54a55
fix: Add time.sleep to wait for file changes to be detected
2024-08-01 17:20:38 -03:00
Paul Gauthier (aider)
97688b91ee
style: Fix linter issues in test_main.py
2024-08-01 17:02:34 -03:00
Paul Gauthier (aider)
f14de907f3
fix: Use os.path.sep for portable path separator
2024-08-01 17:02:31 -03:00
Paul Gauthier (aider)
2a4b6da1d9
test: Ensure Linter is called with correct filename
2024-08-01 16:58:51 -03:00
Paul Gauthier
f696d0933f
fix: Update test_lint_option to handle dirty file in root directory
2024-08-01 16:58:50 -03:00
Paul Gauthier (aider)
bb279d6899
feat: Add test for --lint option
2024-08-01 16:42:12 -03:00
Paul Gauthier (aider)
1a3221e400
fix: Remove unused import of InputOutput
from aider.io
2024-08-01 15:46:59 -03:00
Paul Gauthier
1d875cc5f0
fix: Remove unnecessary assertions in test_scripting.py
2024-08-01 15:46:53 -03:00
Paul Gauthier (aider)
d2dc79978e
style: Fix linter issues in test_scripting.py
2024-08-01 15:44:58 -03:00
Paul Gauthier (aider)
a4b6dea54d
feat: use GitTemporaryDirectory for scripting tests
2024-08-01 15:44:55 -03:00
Paul Gauthier
99ce27f151
fix: Set partial_response_function_call to None in mock_send_side_effect
2024-08-01 15:44:54 -03:00
Paul Gauthier (aider)
bde6bb5c18
style: format code with linter
2024-08-01 15:42:48 -03:00
Paul Gauthier (aider)
96940a319a
fix: Handle functions argument in test mocks
2024-08-01 15:42:44 -03:00
Paul Gauthier
8a6f1337f6
fix: Move mock_send_side_effect definition before its usage
2024-08-01 15:42:43 -03:00
Paul Gauthier (aider)
58a732312b
fix: Remove unused import of MagicMock
2024-08-01 15:40:45 -03:00
Paul Gauthier (aider)
f23c1c94fa
style: format code
2024-08-01 15:40:25 -03:00
Paul Gauthier (aider)
830868605b
fix: Set coder.partial_response_content in mocked send() method
2024-08-01 15:40:23 -03:00
Paul Gauthier (aider)
82a0e5ec40
style: format code to improve readability
2024-08-01 15:37:37 -03:00
Paul Gauthier (aider)
4eb8be9d06
fix: Mock Coder.send() instead of Coder.create and Model
2024-08-01 15:37:34 -03:00
Paul Gauthier (aider)
b29a6e8fa4
style: Format Python code with black
2024-08-01 15:36:29 -03:00
Paul Gauthier (aider)
a480b90217
feat: add unit tests for Python scripting API
2024-08-01 15:36:26 -03:00
Paul Gauthier
f7d0f0c604
feat: Add basic scripting tests
2024-08-01 15:36:24 -03:00
Paul Gauthier
aad52eaae2
fix: Update Coder import path in test_main.py
2024-08-01 15:32:39 -03:00
Paul Gauthier
387b2710b0
fix: Refactor Coder creation to use GitRepo instance
2024-08-01 15:30:49 -03:00
Paul Gauthier
283ac13d2c
Fix tests to use new GitRepo
2024-08-01 15:25:31 -03:00
Paul Gauthier (aider)
5bfedea9ff
feat: update test to correctly access message content
...
The test for `test_get_commit_message_with_custom_prompt` has been updated to correctly access the message content from the positional arguments of the `simple_send_with_retries` function call. This ensures that the test accurately reflects the implementation in the `GitRepo` class.
2024-07-31 09:51:28 -03:00
Paul Gauthier
2212613c47
feat(repo): add support for multiple models in get_commit_message
2024-07-31 09:51:26 -03:00
Paul Gauthier (aider)
7d2f184b36
feat: add tests for commit_prompt functionality
...
The new test case `test_get_commit_message_with_custom_prompt` ensures that when a custom `commit_prompt` is provided to the `GitRepo` constructor, it's used instead of the default prompt when generating commit messages. The test checks that:
1. The custom commit prompt is passed correctly to the `simple_send_with_retries` function.
2. The returned commit message is as expected.
3. The `simple_send_with_retries` function is called only once (since we're using a single model).
This new test case, along with the existing `test_get_commit_message_no_strip_unmatched_quotes` test, provides better coverage for the `get_commit_message` method in the `GitRepo` class.
2024-07-31 09:50:34 -03:00
Paul Gauthier
4a3ea08b49
Add OCaml test case for repomap
2024-07-30 15:03:54 -03:00
Paul Gauthier (aider)
0980985338
Add fallback to second model when first model fails in ChatSummary
2024-07-30 12:16:32 -03:00
Paul Gauthier (aider)
b9b04052c7
Modify the test to check if the linter was called with a filename string whose Path().name matches the expected filename.
2024-07-30 10:10:39 -03:00
Paul Gauthier
33d9f46e25
Add unit test to verify cmd_lint calls linter with correct filename
2024-07-30 10:10:37 -03:00
Paul Gauthier
5edce8ae1b
Add linter output to the dump for debugging
2024-07-29 20:28:43 -03:00
Paul Gauthier (aider)
122eb8834a
Normalize file paths to resolve symbolic links in macOS when comparing absolute file names between coders.
2024-07-29 17:26:14 -03:00
Paul Gauthier
7baa4a802e
Add test to ensure abs_fnames contain unique and correct paths
2024-07-29 17:26:12 -03:00
Paul Gauthier (aider)
78e7b0b922
Use a more specific assertion method in the test case
2024-07-29 17:17:50 -03:00
Paul Gauthier (aider)
d4f5330f55
Fix typo in assertion for "I ran this command"
2024-07-29 17:17:31 -03:00
Paul Gauthier
11facfe4d5
Add test for cmd_run method to handle unbound local error
2024-07-29 17:17:29 -03:00
Paul Gauthier (aider)
23a9ade113
Modify the test to ensure cmd_run returns without errors
2024-07-29 17:10:09 -03:00
Paul Gauthier (aider)
c8e5c27a2f
Add a test to trigger the UnboundLocalError bug in the cmd_run method
...
Commit message: Add test to trigger UnboundLocalError in cmd_run method
2024-07-29 17:07:51 -03:00
Paul Gauthier
b69bf02115
Refactor Coder creation to use file name instead of string representation
2024-07-29 17:05:20 -03:00
Paul Gauthier (aider)
775dd9e6b8
Create a new file in a subdirectory of a git repository, then create a Coder instance from that file and another Coder instance from the first one, ensuring both have the same set of absolute file names.
2024-07-29 16:57:19 -03:00
Paul Gauthier
149db2e5fe
Add test for creating a Coder from another Coder with a subdirectory
2024-07-29 16:57:16 -03:00
Paul Gauthier (aider)
0a61e83c2b
Fix the test_cmd_lint_with_dirty_file
test to handle the MagicMock
object returned by the lint
method.
2024-07-29 16:46:56 -03:00