mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-23 13:54:59 +00:00
Allow GPT to omit the filename from edit blocks, if an earlier block provided it
This commit is contained in:
parent
ef22abd8be
commit
ca74eee2f9
2 changed files with 17 additions and 5 deletions
|
@ -195,9 +195,10 @@ tests/test_repomap.py
|
|||
|
||||
These changes replace the `subprocess.run` patches with `subprocess.check_output` patches in both `test_check_for_ctags_failure` and `test_check_for_ctags_success` tests.
|
||||
"""
|
||||
with self.assertRaises(ValueError) as cm:
|
||||
list(utils.find_original_update_blocks(edit))
|
||||
self.assertIn("missing filename", str(cm.exception))
|
||||
edit_blocks = list(utils.find_original_update_blocks(edit))
|
||||
self.assertEqual(len(edit_blocks), 2) # 2 edits
|
||||
self.assertEqual(edit_blocks[0][0], "tests/test_repomap.py")
|
||||
self.assertEqual(edit_blocks[1][0], "tests/test_repomap.py")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue