diff --git a/tests/basic/test_coder.py b/tests/basic/test_coder.py index 538ae8e3f..6eb0148b0 100644 --- a/tests/basic/test_coder.py +++ b/tests/basic/test_coder.py @@ -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