Commit graph

6 commits

Author SHA1 Message Date
Paul Gauthier
d45b7ae752 handle filenames above the triple quotes 2023-05-11 22:59:02 -07:00
Paul Gauthier
3ec7880dc8 added tests 2023-05-11 22:10:21 -07:00
Paul Gauthier
5444b45a93 aider: Added test for ValueError containing the word "Incomplete" in test_find_original_update_blocks_unclosed.
# Context:
USER: in test_find_original_update_blocks_unclosed, assert that it throws a valueerror containing the word "Incomplete"
ASSISTANT: To add the test for ValueError containing the word "Incomplete" in the `test_find_original_update_blocks_unclosed` function, you can use the `assertRaises` context manager and check if the exception message contains the word "Incomplete". Here's the change:

```python
tests/test_utils.py
<<<<<<< ORIGINAL
        utils.find_original_update_blocks(edit)
=======
        with self.assertRaises(ValueError) as cm:
            utils.find_original_update_blocks(edit)
        self.assertIn("Incomplete", str(cm.exception))
>>>>>>> UPDATED
```
2023-05-11 22:08:30 -07:00
Paul Gauthier
684b0e4964 Provide structured errors to GPT if it generates malformed ORIG/UPD blocks 2023-05-11 22:06:02 -07:00
Paul Gauthier
6133eb61c1 fix tests and bug 2023-05-11 17:15:19 -07:00
Paul Gauthier
6dd586c753 init testing 2023-05-11 17:11:22 -07:00
Renamed from aider/test_utils.py (Browse further)