mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 12:24:59 +00:00
feat: Add tests for --map-tokens option
This commit is contained in:
parent
04fff71e73
commit
45f6f88a46
1 changed files with 12 additions and 0 deletions
|
@ -374,3 +374,15 @@ class TestMain(TestCase):
|
|||
self.assertIn("dark_mode", relevant_output)
|
||||
self.assertRegex(relevant_output, r"AIDER_DARK_MODE:\s+on")
|
||||
self.assertRegex(relevant_output, r"dark_mode:\s+True")
|
||||
|
||||
def test_map_tokens_option(self):
|
||||
with GitTemporaryDirectory():
|
||||
with patch("aider.repomap.RepoMap") as MockRepoMap:
|
||||
main(["--model", "gpt-4", "--map-tokens", "0", "--exit"], input=DummyInput(), output=DummyOutput())
|
||||
MockRepoMap.assert_not_called()
|
||||
|
||||
def test_map_tokens_option_with_non_zero_value(self):
|
||||
with GitTemporaryDirectory():
|
||||
with patch("aider.repomap.RepoMap") as MockRepoMap:
|
||||
main(["--model", "gpt-4", "--map-tokens", "1000", "--exit"], input=DummyInput(), output=DummyOutput())
|
||||
MockRepoMap.assert_called_once()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue