feat: Add test for sonnet and cache options

This commit is contained in:
Paul Gauthier (aider) 2024-08-19 15:31:53 -07:00
parent 69b76c23e8
commit 2513e36104

View file

@ -514,3 +514,17 @@ class TestMain(TestCase):
)
self.assertEqual(coder.main_model.info["max_input_tokens"], 1234)
def test_sonnet_and_cache_options(self):
with GitTemporaryDirectory():
with patch("aider.coders.base_coder.RepoMap") as MockRepoMap:
mock_repo_map = MagicMock()
MockRepoMap.return_value = mock_repo_map
main(
["--sonnet", "--cache", "--exit", "--yes"],
input=DummyInput(),
output=DummyOutput(),
)
mock_repo_map.refresh.assert_called_once_with("files")