fix: handle Windows path formatting in test cases

This commit is contained in:
Paul Gauthier (aider) 2025-03-25 10:59:45 -10:00
parent e6c191bdc6
commit eb0389938c

View file

@ -325,7 +325,9 @@ class TestCoder(unittest.TestCase):
# {test_files[1]},
# ),
# Files with Windows-style paths
(f"Edit the file {test_files[2].replace('/', r'\\')}", {test_files[2]}),
# Pre-format the Windows path to avoid backslash issues in f-string expressions
windows_path = test_files[2].replace('/', '\\')
(f"Edit the file {windows_path}", {test_files[2]}),
# Files with different quote styles
(f'Check "{test_files[5]}" now', {test_files[5]}),
# All files in one complex message