aider/tests
Paul Gauthier b4f78547bc aider: Added setUp and tearDown methods to TestWholeFileCoder class to store and change the working directory back to the original one.
# Context:
USER: add setup and teardown which getcwd and chdir back
ASSISTANT: I will add `setUp` and `tearDown` methods to the `TestWholeFileCoder` class in the `tests/test_wholefile.py` file. The `setUp` method will store the current working directory, and the `tearDown` method will change the working directory back to the original one.

```python
tests/test_wholefile.py
<<<<<<< ORIGINAL
class TestWholeFileCoder(unittest.TestCase):
    def test_update_files(self):
=======
class TestWholeFileCoder(unittest.TestCase):
    def setUp(self):
        self.original_cwd = os.getcwd()

    def tearDown(self):
        os.chdir(self.original_cwd)

    def test_update_files(self):
>>>>>>> UPDATED
```

Let me know if you need any further changes.
2023-06-24 14:35:07 -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 MagicMock with custom mock_send function to set partial_response_content and return False in test_get_commit_message. 2023-06-21 21:39:47 -07:00
test_commands.py fixed test 2023-06-21 21:33:51 -07:00
test_editblock.py fix test after merge 2023-06-23 07:55:03 -07:00
test_io.py isort 2023-05-28 22:47:38 -07:00
test_main.py refac 2023-06-20 17:46:47 -07:00
test_models.py More Model test cases 2023-06-21 14:13:34 -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_wholefile.py aider: Added setUp and tearDown methods to TestWholeFileCoder class to store and change the working directory back to the original one. 2023-06-24 14:35:07 -07:00