mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-27 15:55:00 +00:00
added tests
This commit is contained in:
parent
5444b45a93
commit
3ec7880dc8
1 changed files with 19 additions and 1 deletions
|
@ -76,9 +76,27 @@ oops!
|
|||
"""
|
||||
|
||||
with self.assertRaises(ValueError) as cm:
|
||||
utils.find_original_update_blocks(edit)
|
||||
list(utils.find_original_update_blocks(edit))
|
||||
self.assertIn("Incomplete", str(cm.exception))
|
||||
|
||||
def test_find_original_update_blocks_missing_filename(self):
|
||||
edit = """
|
||||
Here's the change:
|
||||
|
||||
```text
|
||||
<<<<<<< ORIGINAL
|
||||
Two
|
||||
=======
|
||||
Tooooo
|
||||
|
||||
|
||||
oops!
|
||||
"""
|
||||
|
||||
with self.assertRaises(ValueError) as cm:
|
||||
list(utils.find_original_update_blocks(edit))
|
||||
self.assertIn("filename", str(cm.exception))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue