test: use os.path.samefile for file path comparison in save/load test

This commit is contained in:
Paul Gauthier (aider) 2024-10-29 13:20:44 -07:00
parent d4103cc271
commit f800ce1e5a

View file

@ -764,7 +764,7 @@ class TestCommands(TestCase):
read_only_files = {coder.get_rel_fname(f) for f in coder.abs_read_only_fnames}
self.assertEqual(added_files, {str(Path("file1.txt"))})
self.assertEqual(read_only_files, {external_file_path})
self.assertTrue(any(os.path.samefile(external_file_path, f) for f in read_only_files))
# Clean up
Path(session_file).unlink()