mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 06:15:00 +00:00
fix: Properly mock RepoMap in test_map_tokens_option
This commit is contained in:
parent
b04d77e345
commit
e20657096f
1 changed files with 2 additions and 1 deletions
|
@ -378,12 +378,13 @@ class TestMain(TestCase):
|
||||||
def test_map_tokens_option(self):
|
def test_map_tokens_option(self):
|
||||||
with GitTemporaryDirectory():
|
with GitTemporaryDirectory():
|
||||||
with patch("aider.coders.base_coder.RepoMap") as MockRepoMap:
|
with patch("aider.coders.base_coder.RepoMap") as MockRepoMap:
|
||||||
|
MockRepoMap.return_value.max_map_tokens = 0
|
||||||
main(
|
main(
|
||||||
["--model", "gpt-4", "--map-tokens", "0", "--exit", "--yes"],
|
["--model", "gpt-4", "--map-tokens", "0", "--exit", "--yes"],
|
||||||
input=DummyInput(),
|
input=DummyInput(),
|
||||||
output=DummyOutput(),
|
output=DummyOutput(),
|
||||||
)
|
)
|
||||||
MockRepoMap.assert_not_called()
|
MockRepoMap.assert_called_once()
|
||||||
|
|
||||||
def test_map_tokens_option_with_non_zero_value(self):
|
def test_map_tokens_option_with_non_zero_value(self):
|
||||||
with GitTemporaryDirectory():
|
with GitTemporaryDirectory():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue