mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 04:14:59 +00:00
style: Fix linting issues in test_coder.py
This commit is contained in:
parent
e3efab7fbf
commit
df1d259e42
1 changed files with 5 additions and 3 deletions
|
@ -884,17 +884,19 @@ This command will print 'Hello, World!' to the console."""
|
|||
invalid_format = "invalid_format"
|
||||
valid_formats = ["diff", "whole", "map"]
|
||||
exc = UnknownEditFormat(invalid_format, valid_formats)
|
||||
expected_msg = f"Unknown edit format {invalid_format}. Valid formats are: {', '.join(valid_formats)}"
|
||||
expected_msg = (
|
||||
f"Unknown edit format {invalid_format}. Valid formats are: {', '.join(valid_formats)}"
|
||||
)
|
||||
self.assertEqual(str(exc), expected_msg)
|
||||
|
||||
def test_unknown_edit_format_creation(self):
|
||||
# Test that creating a Coder with invalid edit format raises the exception
|
||||
io = InputOutput(yes=True)
|
||||
invalid_format = "invalid_format"
|
||||
|
||||
|
||||
with self.assertRaises(UnknownEditFormat) as cm:
|
||||
Coder.create(self.GPT35, invalid_format, io=io)
|
||||
|
||||
|
||||
exc = cm.exception
|
||||
self.assertEqual(exc.edit_format, invalid_format)
|
||||
self.assertIsInstance(exc.valid_formats, list)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue