Commit graph

17 commits

Author SHA1 Message Date
Paul Gauthier (aider)
6022b09437 fix: Move pre-commit hook creation after initial commit in test 2025-03-20 15:23:15 -07:00
Paul Gauthier (aider)
62b52a78fe style: Remove trailing whitespace in test_repo.py 2025-03-20 15:22:07 -07:00
Paul Gauthier (aider)
e33dc9355d test: Add test for --git-commit-verify option 2025-03-20 15:22:03 -07:00
Paul Gauthier (aider)
606fce65ab test: Fix assertion errors in commit message tests for mock calls 2025-02-04 12:22:09 -08:00
Paul Gauthier (aider)
b4084484ff fix: Update test patches to mock simple_send_with_retries correctly 2025-02-04 12:20:13 -08:00
Paul Gauthier (aider)
c9c2d5ab6f test: update test assertions to check model objects instead of names 2024-12-07 13:38:57 -08:00
Paul Gauthier (aider)
427a83b075 fix: Use call_args_list to verify all calls to mocked function 2024-08-23 15:17:16 -07:00
Paul Gauthier
100cca5dbf feat: Add model dumps to test_repo.py 2024-08-23 15:17:15 -07:00
Paul Gauthier (aider)
04fff71e73 feat: Add tests for subtree_only 2024-08-06 08:47:39 -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)
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 (aider)
f04fb8d53a Add a test for get_commit_message that initializes a GitRepo with two models and ensures the commit message is correctly retrieved from the second model. 2024-07-28 17:13:35 -03:00
Paul Gauthier
896e79bcd1 use pytest.ini testpaths to order testing 2024-07-16 10:33:42 +01:00
Renamed from tests/test_repo.py (Browse further)