mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 08:44:59 +00:00
![]() # Context: USER: after git init, git config user.email and user.name with dummy values ASSISTANT: I understand that you want to set dummy values for `user.email` and `user.name` after running `git init`. I will make the necessary changes in the `test_main_with_empty_git_dir_new_file` function in the `tests/test_main.py` file. ```python tests/test_main.py <<<<<<< ORIGINAL def test_main_with_empty_git_dir_new_file(self): with tempfile.TemporaryDirectory() as temp_dir: os.chdir(temp_dir) subprocess.run(["git", "init"], cwd=temp_dir) pipe_input = create_input(StringIO("")) main(["--yes", "foo.txt"], input=pipe_input, output=DummyOutput()) pipe_input.close() self.assertTrue(os.path.exists("foo.txt")) ======= def test_main_with_empty_git_dir_new_file(self): with tempfile.TemporaryDirectory() as temp_dir: os.chdir(temp_dir) subprocess.run(["git", "init"], cwd=temp_dir) subprocess.run(["git", "config", "user.email", "dummy@example.com"], cwd=temp_dir) subprocess.run(["git", "config", "user.name", "Dummy User"], cwd=temp_dir) pipe_input = create_input(StringIO("")) main(["--yes", "foo.txt"], input=pipe_input, output=DummyOutput()) pipe_input.close() self.assertTrue(os.path.exists("foo.txt")) >>>>>>> UPDATED ``` Now, after running `git init`, the test function will also set dummy values for `user.email` and `user.name`. |
||
---|---|---|
.. | ||
__init__.py | ||
test_coder.py | ||
test_commands.py | ||
test_main.py | ||
test_repomap.py | ||
test_utils.py |