mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-23 13:54:59 +00:00
test: Fix confirm_ask test to handle invalid input and verify call count
This commit is contained in:
parent
843cc9ee4e
commit
4ea68efd0e
1 changed files with 2 additions and 2 deletions
|
@ -193,10 +193,10 @@ class TestInputOutput(unittest.TestCase):
|
|||
|
||||
# Test that allow_never=False does not add to never_prompts
|
||||
mock_input.reset_mock()
|
||||
mock_input.side_effect = ["d"]
|
||||
mock_input.side_effect = ["d", "n"]
|
||||
result = io.confirm_ask("Do you want to proceed?", allow_never=False)
|
||||
self.assertFalse(result)
|
||||
mock_input.assert_called_once()
|
||||
self.assertEqual(mock_input.call_count, 2)
|
||||
self.assertNotIn(("Do you want to proceed?", None), io.never_prompts)
|
||||
|
||||
def test_get_command_completions(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue