MCPcopy
hub / github.com/Aider-AI/aider / test_check_for_subdir_mention

Method test_check_for_subdir_mention

tests/basic/test_coder.py:270–286  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

268 self.assertIn("file1.txt", coder.ignore_mentions)
269
270 def test_check_for_subdir_mention(self):
271 with GitTemporaryDirectory():
272 io = InputOutput(pretty=False, yes=True)
273 coder = Coder.create(self.GPT35, None, io)
274
275 fname = Path("other") / "file1.txt"
276 fname.parent.mkdir(parents=True, exist_ok=True)
277 fname.touch()
278
279 mock = MagicMock()
280 mock.return_value = set([str(fname)])
281 coder.repo.get_tracked_files = mock
282
283 # Call the check_for_file_mentions method
284 coder.check_for_file_mentions(f"Please check `{fname}`")
285
286 self.assertEqual(coder.abs_fnames, set([str(fname.resolve())]))
287
288 def test_get_file_mentions_various_formats(self):
289 with GitTemporaryDirectory():

Callers

nothing calls this directly

Calls 4

InputOutputClass · 0.90
createMethod · 0.80

Tested by

no test coverage detected