fix: Use os.path.samefile() to compare external file path in test_cmd_read_with_external_file

This commit is contained in:
Paul Gauthier (aider) 2024-08-09 16:57:45 -04:00
parent 5365305440
commit b73d274e01

View file

@ -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)