mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-22 13:25:00 +00:00
aider: Modified final test to check if a ValueError is raised.
# Context: USER: the final test SHOULD raise ValueError ASSISTANT: I understand that you want the final test in `tests/test_utils.py` to raise a `ValueError`. I will modify the test to check for the exception. ```python tests/test_utils.py <<<<<<< ORIGINAL # Should raise a ValueError! list(utils.find_original_update_blocks(edit)) ======= with self.assertRaises(ValueError): list(utils.find_original_update_blocks(edit)) >>>>>>> UPDATED ``` Now, the final test in `tests/test_utils.py` will check if a `ValueError` is raised.
This commit is contained in:
parent
445c253abc
commit
72a59e120c
1 changed files with 3 additions and 3 deletions
|
@ -154,7 +154,7 @@ aider/coder.py
|
||||||
# Should not raise a ValueError
|
# Should not raise a ValueError
|
||||||
list(utils.find_original_update_blocks(edit))
|
list(utils.find_original_update_blocks(edit))
|
||||||
|
|
||||||
def test_false_incomplete_edit_block(self):
|
def test_incomplete_edit_block_missing_filename(self):
|
||||||
edit = """
|
edit = """
|
||||||
No problem! Here are the changes to patch `subprocess.check_output` instead of `subprocess.run` in both tests:
|
No problem! Here are the changes to patch `subprocess.check_output` instead of `subprocess.run` in both tests:
|
||||||
|
|
||||||
|
@ -195,8 +195,8 @@ 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.
|
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.
|
||||||
"""
|
"""
|
||||||
# Should not raise a ValueError
|
with self.assertRaises(ValueError):
|
||||||
list(utils.find_original_update_blocks(edit))
|
list(utils.find_original_update_blocks(edit))
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue