fix broken test

This commit is contained in:
Paul Gauthier 2023-07-05 17:11:39 -07:00
parent e996c56a51
commit 5dba1624c7
2 changed files with 1 additions and 5 deletions

View file

@ -568,10 +568,6 @@ class Coder:
for fname, rel_fnames in fname_to_rel_fnames.items():
if len(rel_fnames) == 1 and fname in words:
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:
return

View file

@ -65,7 +65,7 @@ class TestCoder(unittest.TestCase):
# Mock the git repo
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
# Call the check_for_file_mentions method