aider/tests
Paul Gauthier 737394f9b6 aider: Added a test case for replace_part_with_missing_leading_whitespace function.
# Context:
USER: add a test for `replace_part_with_missing_leading_whitespace`
ASSISTANT: To add a test for `replace_part_with_missing_leading_whitespace`, we will modify the `tests/test_utils.py` file.

```python
tests/test_utils.py
<<<<<<< ORIGINAL
if __name__ == "__main__":
    unittest.main()
=======
    def test_replace_part_with_missing_leading_whitespace(self):
        whole = "    line1\n    line2\n    line3\n"
        part = "line1\nline2"
        replace = "new_line1\nnew_line2"
        expected_output = "    new_line1\n    new_line2\n    line3\n"

        result = utils.replace_part_with_missing_leading_whitespace(whole, part, replace)
        self.assertEqual(result, expected_output)

if __name__ == "__main__":
    unittest.main()
>>>>>>> UPDATED
```

This new test case checks if the `replace_part_with_missing_leading_whitespace` function correctly handles the case when the part and replace blocks have missing leading whitespaces.
2023-06-09 14:52:37 -07:00
..
__init__.py aider: Added empty __init__.py file to tests directory to fix ModuleNotFoundError when running tests. 2023-05-11 17:12:42 -07:00
test_coder.py aider: Replaced patching of aider.coder.backoff.expo with patching of the print function and updated the assertions accordingly. 2023-06-04 06:05:48 -07:00
test_commands.py patch check_model_availability in tests 2023-06-01 08:58:35 -07:00
test_io.py isort 2023-05-28 22:47:38 -07:00
test_main.py aider: Added patch to setUp method and stored mock object as an instance variable. 2023-06-01 08:54:15 -07:00
test_repomap.py Return files without any tags at all at the tail of the ranked_tags list 2023-06-04 14:53:14 -07:00
test_utils.py aider: Added a test case for replace_part_with_missing_leading_whitespace function. 2023-06-09 14:52:37 -07:00