mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 22:34:59 +00:00
feat: Add test for --map-mul option and update RepoMap to print map_mul_no_files
This commit is contained in:
parent
64d47df118
commit
bbb40e3045
2 changed files with 14 additions and 0 deletions
|
@ -69,6 +69,9 @@ class RepoMap:
|
|||
self.map_processing_time = 0
|
||||
self.last_map = None
|
||||
|
||||
if self.verbose:
|
||||
self.io.tool_output(f"RepoMap initialized with map_mul_no_files: {self.map_mul_no_files}")
|
||||
|
||||
def token_count(self, text):
|
||||
len_text = len(text)
|
||||
if len_text < 200:
|
||||
|
|
|
@ -574,3 +574,14 @@ class TestMain(TestCase):
|
|||
return_coder=False,
|
||||
)
|
||||
self.assertIsNone(result)
|
||||
|
||||
def test_map_mul_option(self):
|
||||
with GitTemporaryDirectory():
|
||||
coder = main(
|
||||
["--map-mul", "5", "--exit", "--yes"],
|
||||
input=DummyInput(),
|
||||
output=DummyOutput(),
|
||||
return_coder=True,
|
||||
)
|
||||
self.assertIsInstance(coder, Coder)
|
||||
self.assertEqual(coder.repo_map.map_mul_no_files, 5)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue