From b73d274e015a64d3deec34a6dbb24543c113c6d4 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 9 Aug 2024 16:57:45 -0400 Subject: [PATCH] fix: Use os.path.samefile() to compare external file path in test_cmd_read_with_external_file --- tests/basic/test_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/basic/test_commands.py b/tests/basic/test_commands.py index 708fa257e..4b7a93b0f 100644 --- a/tests/basic/test_commands.py +++ b/tests/basic/test_commands.py @@ -769,7 +769,7 @@ class TestCommands(TestCase): # Check if the external file was added to abs_read_only_fnames real_external_file_path = os.path.realpath(external_file_path) - self.assertIn(real_external_file_path, coder.abs_read_only_fnames) + self.assertTrue(any(os.path.samefile(real_external_file_path, fname) for fname in coder.abs_read_only_fnames)) # Test dropping the external read-only file commands.cmd_drop(external_file_path)