mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 12:24:59 +00:00
fix: pre-calculate Windows paths to avoid f-string backslash issues
This commit is contained in:
parent
c67bbe6c00
commit
4716cce208
1 changed files with 3 additions and 2 deletions
|
@ -302,6 +302,7 @@ class TestCoder(unittest.TestCase):
|
||||||
|
|
||||||
# Pre-format the Windows path to avoid backslash issues in f-string expressions
|
# Pre-format the Windows path to avoid backslash issues in f-string expressions
|
||||||
windows_path = test_files[2].replace("/", "\\")
|
windows_path = test_files[2].replace("/", "\\")
|
||||||
|
win_path3 = test_files[3].replace('/', '\\')
|
||||||
|
|
||||||
for fname in test_files:
|
for fname in test_files:
|
||||||
fpath = Path(fname)
|
fpath = Path(fname)
|
||||||
|
@ -336,7 +337,7 @@ class TestCoder(unittest.TestCase):
|
||||||
(
|
(
|
||||||
f"First, edit `{test_files[0]}`. Then modify {test_files[1]}.\n"
|
f"First, edit `{test_files[0]}`. Then modify {test_files[1]}.\n"
|
||||||
f"```js\n// Update this file\nconst file = '{test_files[2]}';\n```\n"
|
f"```js\n// Update this file\nconst file = '{test_files[2]}';\n```\n"
|
||||||
f"Finally check {test_files[3].replace('/', '\\')}"
|
f"Finally check {win_path3}"
|
||||||
),
|
),
|
||||||
{test_files[0], test_files[1], test_files[2], test_files[3]},
|
{test_files[0], test_files[1], test_files[2], test_files[3]},
|
||||||
),
|
),
|
||||||
|
@ -347,7 +348,7 @@ class TestCoder(unittest.TestCase):
|
||||||
{test_files[1], test_files[2]},
|
{test_files[1], test_files[2]},
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
f"The file **{test_files[3].replace('/', '\\')}** needs updating",
|
f"The file **{win_path3}** needs updating",
|
||||||
{test_files[3]},
|
{test_files[3]},
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue