mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
style: Format code using linter
This commit is contained in:
parent
9228a57b66
commit
0ee35556ef
1 changed files with 12 additions and 10 deletions
|
@ -449,7 +449,7 @@ class TestRepoMapAllLanguages(unittest.TestCase):
|
||||||
generated_map = repo_map.get_repo_map([], other_files)
|
generated_map = repo_map.get_repo_map([], other_files)
|
||||||
|
|
||||||
# Read the expected map from the file
|
# Read the expected map from the file
|
||||||
with open(expected_map_file, 'r') as f:
|
with open(expected_map_file, "r") as f:
|
||||||
expected_map = f.read().strip()
|
expected_map = f.read().strip()
|
||||||
|
|
||||||
# Convert the generated map to a string representation
|
# Convert the generated map to a string representation
|
||||||
|
@ -459,20 +459,22 @@ class TestRepoMapAllLanguages(unittest.TestCase):
|
||||||
if generated_map_str != expected_map:
|
if generated_map_str != expected_map:
|
||||||
# If they differ, show the differences and fail the test
|
# If they differ, show the differences and fail the test
|
||||||
import difflib
|
import difflib
|
||||||
diff = list(difflib.unified_diff(
|
|
||||||
expected_map.splitlines(),
|
diff = list(
|
||||||
generated_map_str.splitlines(),
|
difflib.unified_diff(
|
||||||
fromfile='expected',
|
expected_map.splitlines(),
|
||||||
tofile='generated',
|
generated_map_str.splitlines(),
|
||||||
lineterm=''
|
fromfile="expected",
|
||||||
))
|
tofile="generated",
|
||||||
diff_str = '\n'.join(diff)
|
lineterm="",
|
||||||
|
)
|
||||||
|
)
|
||||||
|
diff_str = "\n".join(diff)
|
||||||
self.fail(f"Generated map differs from expected map:\n{diff_str}")
|
self.fail(f"Generated map differs from expected map:\n{diff_str}")
|
||||||
|
|
||||||
# If we reach here, the maps are identical
|
# If we reach here, the maps are identical
|
||||||
self.assertEqual(generated_map_str, expected_map, "Generated map matches expected map")
|
self.assertEqual(generated_map_str, expected_map, "Generated map matches expected map")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue