From 2513e36104a36f6745e8883e541c481597732b79 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Mon, 19 Aug 2024 15:31:53 -0700 Subject: [PATCH] feat: Add test for sonnet and cache options --- tests/basic/test_main.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/basic/test_main.py b/tests/basic/test_main.py index c7418b809..d48f02c93 100644 --- a/tests/basic/test_main.py +++ b/tests/basic/test_main.py @@ -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")