mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 10:45:00 +00:00
Modify the test to ensure cmd_run returns without errors
This commit is contained in:
parent
c8e5c27a2f
commit
23a9ade113
1 changed files with 3 additions and 3 deletions
|
@ -547,9 +547,9 @@ class TestCommands(TestCase):
|
||||||
# Mock the io.prompt_ask method to simulate user input
|
# Mock the io.prompt_ask method to simulate user input
|
||||||
io.prompt_ask = lambda *args, **kwargs: "custom instructions"
|
io.prompt_ask = lambda *args, **kwargs: "custom instructions"
|
||||||
|
|
||||||
# Test the cmd_run method with a command that should trigger the bug
|
# Test the cmd_run method with a command that should not raise an error
|
||||||
with self.assertRaises(UnboundLocalError):
|
result = commands.cmd_run("echo test", add_on_nonzero_exit=False)
|
||||||
commands.cmd_run("echo test", add_on_nonzero_exit=False)
|
self.assertIsNone(result, "cmd_run should return None without raising an error")
|
||||||
|
|
||||||
def test_cmd_add_drop_untracked_files(self):
|
def test_cmd_add_drop_untracked_files(self):
|
||||||
with GitTemporaryDirectory():
|
with GitTemporaryDirectory():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue