Commit graph

80 commits

Author SHA1 Message Date
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
Paul Gauthier (aider)
24c8363aa8 Fix unused import of unittest in tests/basic/test_commands.py 2024-07-29 16:45:59 -03:00
Paul Gauthier
f90cd6b69b Add unit tests for the cmd_lint command 2024-07-29 16:45:57 -03:00
Paul Gauthier (aider)
cf35c2db4e Fix the test_cmd_lint_with_dirty_file test to use mocking instead of captured output 2024-07-29 16:45:21 -03:00
Paul Gauthier
bb7465e05d Modify test_commands.py to mock linter.lint method and assert it was called with the dirty file 2024-07-29 16:45:18 -03:00
Paul Gauthier (aider)
894eff4393 Add a test that checks if the cmd_lint command correctly identifies a dirty file in a repository. 2024-07-29 16:30:08 -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
8a9184cef9 Fix tests for check_for_urls 2024-07-28 16:48:59 -03:00
Paul Gauthier (aider)
a0eadb62c5 Add test case for check_for_urls to handle repeated URLs 2024-07-28 16:40:39 -03:00
Paul Gauthier
bb86fed9f6 disable ocaml test for now, until fixed 2024-07-24 09:41:25 +02:00
Paul Gauthier (aider)
9db28c0052 Added a new test case to ensure the RepoMap class can handle and include files from all supported languages. 2024-07-24 09:24:52 +02:00
Paul Gauthier (aider)
d31eef3fc6 Mocked Path.home() in addition to setting os.environ["HOME"] in the test_env_file_override function. 2024-07-18 17:42:50 +01:00
Paul Gauthier
e36d47cfdb Added tests and fix for env file precedence #868 2024-07-18 17:20:58 +01:00
Paul Gauthier (aider)
c9bcc1aa57 Added a test to check the .env file override behavior as described in the documentation. 2024-07-18 17:07:38 +01:00
Paul Gauthier
397c5d5921 added a test for /tokens #863 2024-07-18 16:54:26 +01:00
Paul Gauthier (aider)
cdd45c7d28 Added a test for the cmd_tokens method that creates a small Git repository, adds files to the chat, and verifies that the output of cmd_tokens includes the repository map information and details about the added files. 2024-07-18 16:39:42 +01:00
Paul Gauthier
c99c5db35c updated coder test 2024-07-18 16:35:27 +01:00
Paul Gauthier (aider)
6fdb4f8214 Handled case where first commit cannot be undone 2024-07-18 16:32:47 +01:00
Paul Gauthier
3ce3799f8d Implemented checks to ensure files with uncommitted changes or not present in previous commit cannot be undone safely. 2024-07-18 16:32:45 +01:00
Paul Gauthier
e7f29c2dbc Added a new test case for cmd_undo with a newly committed file. 2024-07-18 16:17:20 +01:00
Paul Gauthier (aider)
9aeeaf383f Implemented a test that will trigger the bug described in issue #882. 2024-07-18 16:09:38 +01:00
Paul Gauthier (aider)
07550d6f5f Added tests to exercise all combinations of path formats for get_file_mentions and get_addable_relative_files, and updated the get_file_mentions method to handle both Unix and Windows path formats. 2024-07-18 15:19:32 +01:00
Paul Gauthier
896e79bcd1 use pytest.ini testpaths to order testing 2024-07-16 10:33:42 +01:00