mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-22 13:25:00 +00:00
fix broken test
This commit is contained in:
parent
e996c56a51
commit
5dba1624c7
2 changed files with 1 additions and 5 deletions
|
@ -568,10 +568,6 @@ class Coder:
|
||||||
for fname, rel_fnames in fname_to_rel_fnames.items():
|
for fname, rel_fnames in fname_to_rel_fnames.items():
|
||||||
if len(rel_fnames) == 1 and fname in words:
|
if len(rel_fnames) == 1 and fname in words:
|
||||||
mentioned_rel_fnames.add(rel_fnames[0])
|
mentioned_rel_fnames.add(rel_fnames[0])
|
||||||
else:
|
|
||||||
for rel_fname in rel_fnames:
|
|
||||||
if rel_fname in words:
|
|
||||||
mentioned_rel_fnames.add(rel_fname)
|
|
||||||
|
|
||||||
if not mentioned_rel_fnames:
|
if not mentioned_rel_fnames:
|
||||||
return
|
return
|
||||||
|
|
|
@ -65,7 +65,7 @@ class TestCoder(unittest.TestCase):
|
||||||
|
|
||||||
# Mock the git repo
|
# Mock the git repo
|
||||||
mock_repo = MagicMock()
|
mock_repo = MagicMock()
|
||||||
mock_repo.git.ls_files.return_value = "./file1.txt\n./other/file1.txt"
|
mock_repo.git.ls_files.return_value = "file1.txt\nother/file1.txt"
|
||||||
coder.repo = mock_repo
|
coder.repo = mock_repo
|
||||||
|
|
||||||
# Call the check_for_file_mentions method
|
# Call the check_for_file_mentions method
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue