mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 04:14:59 +00:00
test: add test for invalid edit format handling
This commit is contained in:
parent
e647a5b733
commit
743f0f5540
1 changed files with 13 additions and 0 deletions
|
@ -667,6 +667,19 @@ class TestMain(TestCase):
|
|||
)
|
||||
self.assertTrue(coder.detect_urls)
|
||||
|
||||
def test_invalid_edit_format(self):
|
||||
with GitTemporaryDirectory():
|
||||
with patch("aider.io.InputOutput.offer_url") as mock_offer_url:
|
||||
with self.assertRaises(SystemExit):
|
||||
main(
|
||||
["--edit-format", "not-a-real-format", "--exit", "--yes"],
|
||||
input=DummyInput(),
|
||||
output=DummyOutput(),
|
||||
)
|
||||
mock_offer_url.assert_called_once()
|
||||
args, _ = mock_offer_url.call_args
|
||||
self.assertEqual(args[0], "https://aider.chat/docs/edit-formats.html")
|
||||
|
||||
def test_chat_language_spanish(self):
|
||||
with GitTemporaryDirectory():
|
||||
coder = main(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue