test: Add Windows path handling in file mention tests

This commit is contained in:
Paul Gauthier (aider) 2025-03-25 11:01:44 -10:00
parent 871c6d56dc
commit 7302280417

View file

@ -300,6 +300,9 @@ class TestCoder(unittest.TestCase):
"special_chars!@#.md",
]
# Pre-format the Windows path to avoid backslash issues in f-string expressions
windows_path = test_files[2].replace('/', '\\')
for fname in test_files:
fpath = Path(fname)
fpath.parent.mkdir(parents=True, exist_ok=True)