aider is AI pair programming in your terminal https://aider.chat/
Find a file
Paul Gauthier ef7e63a728 Add tests for strip_quoted_wrapping function in test_utils.py.
# Context:
USER: add tests for strip_quoted_wrapping
ASSISTANT: I will add tests for the `strip_quoted_wrapping` function in the `test_utils.py` file.

```python
test_utils.py
<<<<<<< ORIGINAL
if __name__ == "__main__":
    unittest.main()
=======
    def test_strip_quoted_wrapping(self):
        input_text = "filename.ext\n```\nWe just want this content\nNot the filename and triple quotes\n```"
        expected_output = "We just want this content\nNot the filename and triple quotes\n"
        result = strip_quoted_wrapping(input_text, "filename.ext")
        self.assertEqual(result, expected_output)

    def test_strip_quoted_wrapping_no_filename(self):
        input_text = "```\nWe just want this content\nNot the triple quotes\n```"
        expected_output = "We just want this content\nNot the triple quotes\n"
        result = strip_quoted_wrapping(input_text)
        self.assertEqual(result, expected_output)

    def test_strip_quoted_wrapping_no_wrapping(self):
        input_text = "We just want this content\nNot the triple quotes\n"
        expected_output = "We just want this content\nNot the triple quotes\n"
        result = strip_quoted_wrapping(input_text)
        self.assertEqual(result, expected_output)

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

These tests cover cases when the input text has a filename, no filename, and no wrapping at all.
2023-05-09 08:44:35 -07:00
.flake8 debug 2023-05-08 22:55:55 -07:00
.pre-commit-config.yaml added flake8 2023-05-07 22:13:57 -07:00
coder.py WIP: Refactor do_replace method to utils module and update references in coder module. 2023-05-09 07:31:26 -07:00
dump.py init 2023-04-19 09:03:23 -07:00
main.py WIP: Refactor CLI help messages to use $ prefix for environment variables. 2023-05-09 00:38:10 -07:00
prompts.py prompts 2023-05-09 00:38:55 -07:00
test_utils.py Add tests for strip_quoted_wrapping function in test_utils.py. 2023-05-09 08:44:35 -07:00
utils.py added docstring to strip_quoted_wrapping 2023-05-09 07:42:05 -07:00