mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 16:54:59 +00:00
refactor: Extract language test loop into helper method
This commit is contained in:
parent
570e8eae31
commit
a709d650df
1 changed files with 42 additions and 40 deletions
|
@ -323,11 +323,13 @@ class TestRepoMapAllLanguages(unittest.TestCase):
|
|||
fixtures_dir = Path(__file__).parent.parent / "fixtures" / "languages"
|
||||
|
||||
for lang, key_symbol in language_files.items():
|
||||
# make the inside of this loop into a helper method ai!
|
||||
self._test_language_repo_map(lang, key_symbol, fixtures_dir)
|
||||
|
||||
def _test_language_repo_map(self, lang, key_symbol, fixtures_dir):
|
||||
"""Helper method to test repo map generation for a specific language."""
|
||||
# Get the fixture file path and name based on language
|
||||
fixture_dir = fixtures_dir / lang
|
||||
ext, key_symbol = language_files[lang]
|
||||
ext, key_symbol = key_symbol
|
||||
filename = f"test.{ext}"
|
||||
fixture_path = fixture_dir / filename
|
||||
self.assertTrue(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue