mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 16:54:59 +00:00
fix: Convert generated repo map to string before comparison
This commit is contained in:
parent
0ee35556ef
commit
eb7870c2c1
1 changed files with 1 additions and 4 deletions
|
@ -446,15 +446,12 @@ class TestRepoMapAllLanguages(unittest.TestCase):
|
||||||
other_files = [str(f) for f in sample_code_base.rglob("*") if f.is_file()]
|
other_files = [str(f) for f in sample_code_base.rglob("*") if f.is_file()]
|
||||||
|
|
||||||
# Generate the repo map
|
# Generate the repo map
|
||||||
generated_map = repo_map.get_repo_map([], other_files)
|
generated_map_str = 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
|
|
||||||
generated_map_str = repo_map.map_to_string(generated_map).strip()
|
|
||||||
|
|
||||||
# Compare the generated map with the expected map
|
# Compare the generated map with the expected map
|
||||||
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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue