diff --git a/tests/basic/test_commands.py b/tests/basic/test_commands.py index 9ef8b8559..6b5aae7fd 100644 --- a/tests/basic/test_commands.py +++ b/tests/basic/test_commands.py @@ -547,9 +547,9 @@ class TestCommands(TestCase): # Mock the io.prompt_ask method to simulate user input io.prompt_ask = lambda *args, **kwargs: "custom instructions" - # Test the cmd_run method with a command that should trigger the bug - with self.assertRaises(UnboundLocalError): - commands.cmd_run("echo test", add_on_nonzero_exit=False) + # Test the cmd_run method with a command that should not raise an error + result = 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): with GitTemporaryDirectory():