feat: Add test for main() with --sonnet and --cache-prompts options

This commit is contained in:
Paul Gauthier (aider) 2024-08-19 16:06:34 -07:00
parent 1ea18b83b9
commit 3424cda63c

View file

@ -533,3 +533,15 @@ class TestMain(TestCase):
self.assertEqual(
call_kwargs.get("refresh"), "files"
) # Check the 'refresh' keyword argument
def test_sonnet_and_cache_prompts_options(self):
with GitTemporaryDirectory():
coder = main(
["--sonnet", "--cache-prompts", "--exit", "--yes"],
input=DummyInput(),
output=DummyOutput(),
return_coder=True,
)
self.assertTrue(coder.add_cache_headers)
self.assertEqual(coder.main_model.name, "gpt-4-1106-preview")