mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-21 21:04:59 +00:00
fix: Add SwitchCoder exception handling in cmd_help
This commit is contained in:
parent
e7c035def4
commit
216ad3b6b5
2 changed files with 8 additions and 8 deletions
|
@ -10,7 +10,7 @@ from unittest import TestCase, mock
|
|||
import git
|
||||
|
||||
from aider.coders import Coder
|
||||
from aider.commands import Commands
|
||||
from aider.commands import Commands, SwitchCoder
|
||||
from aider.dump import dump # noqa: F401
|
||||
from aider.io import InputOutput
|
||||
from aider.models import Model
|
||||
|
@ -882,12 +882,6 @@ class TestCommands(TestCase):
|
|||
mock_run.assert_called_once()
|
||||
mock_run.assert_called_once_with(question)
|
||||
|
||||
self.assertEqual(len(coder.cur_messages), 2)
|
||||
self.assertEqual(coder.cur_messages[0]["role"], "user")
|
||||
self.assertEqual(coder.cur_messages[0]["content"], question)
|
||||
self.assertEqual(coder.cur_messages[1]["role"], "assistant")
|
||||
self.assertEqual(coder.cur_messages[1]["content"], canned_reply)
|
||||
|
||||
def test_cmd_lint_with_dirty_file(self):
|
||||
with GitTemporaryDirectory() as repo_dir:
|
||||
repo = git.Repo(repo_dir)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue