mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 20:35:00 +00:00
added test coverage #585
This commit is contained in:
parent
0de6b36cde
commit
250d89649b
2 changed files with 19 additions and 1 deletions
|
@ -219,3 +219,21 @@ class TestMain(TestCase):
|
|||
main(["--message", test_message], input=DummyInput(), output=DummyOutput())
|
||||
|
||||
mock_io_instance.add_to_input_history.assert_called_once_with(test_message)
|
||||
|
||||
@patch("aider.main.InputOutput")
|
||||
@patch("aider.coders.base_coder.Coder.run")
|
||||
def test_yes(self, mock_run, MockInputOutput):
|
||||
test_message = "test message"
|
||||
|
||||
main(["--yes", "--message", test_message])
|
||||
args, kwargs = MockInputOutput.call_args
|
||||
self.assertTrue(args[1])
|
||||
|
||||
@patch("aider.main.InputOutput")
|
||||
@patch("aider.coders.base_coder.Coder.run")
|
||||
def test_default_yes(self, mock_run, MockInputOutput):
|
||||
test_message = "test message"
|
||||
|
||||
main(["--message", test_message])
|
||||
args, kwargs = MockInputOutput.call_args
|
||||
self.assertEqual(args[1], None)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue