mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 06:44: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
|
@ -22,7 +22,13 @@ class TestHelp(unittest.TestCase):
|
|||
help_coder_run = MagicMock(return_value="")
|
||||
aider.coders.HelpCoder.run = help_coder_run
|
||||
|
||||
commands.cmd_help("hi")
|
||||
try:
|
||||
commands.cmd_help("hi")
|
||||
except aider.commands.SwitchCoder:
|
||||
pass
|
||||
else:
|
||||
# If no exception was raised, fail the test
|
||||
assert False, "SwitchCoder exception was not raised"
|
||||
|
||||
help_coder_run.assert_called_once()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue