mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-21 12:55:00 +00:00
added failing test for mention
This commit is contained in:
parent
edbec5498e
commit
16a21d9844
1 changed files with 16 additions and 0 deletions
|
@ -110,6 +110,22 @@ class TestCoder(unittest.TestCase):
|
|||
|
||||
self.assertEqual(coder.abs_fnames, set())
|
||||
|
||||
def test_check_for_subdir_mention(self):
|
||||
# Mock the IO object
|
||||
mock_io = MagicMock()
|
||||
|
||||
# Initialize the Coder object with the mocked IO and mocked repo
|
||||
coder = Coder.create(models.GPT4, None, mock_io)
|
||||
|
||||
mock = MagicMock()
|
||||
mock.return_value = set(["other/file1.txt"])
|
||||
coder.get_tracked_files = mock
|
||||
|
||||
# Call the check_for_file_mentions method
|
||||
coder.check_for_file_mentions("Please check `other/file1.txt`")
|
||||
|
||||
self.assertEqual(coder.abs_fnames, set([Path("other/file1.txt").resolve()]))
|
||||
|
||||
def test_get_commit_message(self):
|
||||
# Mock the IO object
|
||||
mock_io = MagicMock()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue