fix: Catch SwitchCoder exception in test_cmd_ask

This commit is contained in:
Paul Gauthier (aider) 2024-08-10 14:45:25 -07:00
parent 156f11248f
commit e7c035def4

View file

@ -876,6 +876,7 @@ class TestCommands(TestCase):
with mock.patch("aider.coders.Coder.run") as mock_run:
mock_run.return_value = canned_reply
with self.assertRaises(SwitchCoder):
commands.cmd_ask(question)
mock_run.assert_called_once()