Add test to ensure abs_fnames contain unique and correct paths

This commit is contained in:
Paul Gauthier 2024-07-29 17:26:12 -03:00 committed by Paul Gauthier (aider)
parent 78e7b0b922
commit 7baa4a802e

View file

@ -713,7 +713,7 @@ two
repo.git.commit("-m", "Add test file") repo.git.commit("-m", "Add test file")
# Change directory to the subdirectory # Change directory to the subdirectory
os.chdir(subdir) os.chdir(subdir.resolve())
# Create the first coder # Create the first coder
io = InputOutput(yes=True) io = InputOutput(yes=True)
@ -730,6 +730,10 @@ two
self.assertIn(expected_abs_path, coder1.abs_fnames) self.assertIn(expected_abs_path, coder1.abs_fnames)
self.assertIn(expected_abs_path, coder2.abs_fnames) self.assertIn(expected_abs_path, coder2.abs_fnames)
# Check that the abs_fnames do not contain duplicate or incorrect paths
self.assertEqual(len(coder1.abs_fnames), 1)
self.assertEqual(len(coder2.abs_fnames), 1)
if __name__ == "__main__": if __name__ == "__main__":
unittest.main() unittest.main()