mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-21 12:55:00 +00:00
aider: Modified test to check if coder.abs_fnames
contains both files.
# Context: USER: don't compare the result string. check that coder.abs_fnames now contains both files ASSISTANT: To update the test to check if `coder.abs_fnames` contains both files, modify the test as follows: ```python tests/test_coder.py <<<<<<< ORIGINAL # Check if the result is as expected self.assertEqual(result, "Added files: file1.txt, file2.py") ======= # Check if coder.abs_fnames contains both files expected_files = {os.path.abspath("file1.txt"), os.path.abspath("file2.py")} self.assertEqual(coder.abs_fnames, expected_files) >>>>>>> UPDATED ``` This change will ensure that the test checks if `coder.abs_fnames` contains both files instead of comparing the result string.
This commit is contained in:
parent
4ac2143cc2
commit
bcf258f1c6
1 changed files with 3 additions and 2 deletions
|
@ -20,8 +20,9 @@ class TestCoder(unittest.TestCase):
|
||||||
# Call the check_for_file_mentions method
|
# Call the check_for_file_mentions method
|
||||||
result = coder.check_for_file_mentions("Please check file1.txt and file2.py")
|
result = coder.check_for_file_mentions("Please check file1.txt and file2.py")
|
||||||
|
|
||||||
# Check if the result is as expected
|
# Check if coder.abs_fnames contains both files
|
||||||
self.assertEqual(result, "Added files: file1.txt, file2.py")
|
expected_files = {os.path.abspath("file1.txt"), os.path.abspath("file2.py")}
|
||||||
|
self.assertEqual(coder.abs_fnames, expected_files)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue