mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 16:54:59 +00:00
aider: Passed temp_dir
as the cwd
to subprocess
in test_main_with_empty_git_dir_new_file
.
# Context: USER: pass temp_dir as the cwd to subprocess in test_main_with_empty_git_dir_new_file ASSISTANT: Here's the change to pass `temp_dir` as the `cwd` to `subprocess` in the `test_main_with_empty_git_dir_new_file` function: ```python tests/test_main.py <<<<<<< ORIGINAL subprocess.run(["git", "init"]) ======= subprocess.run(["git", "init"], cwd=temp_dir) >>>>>>> UPDATED ```
This commit is contained in:
parent
8a60462167
commit
3b0c5132f2
1 changed files with 1 additions and 1 deletions
|
@ -29,7 +29,7 @@ class TestMain(TestCase):
|
|||
def test_main_with_empty_git_dir_new_file(self):
|
||||
with tempfile.TemporaryDirectory() as temp_dir:
|
||||
os.chdir(temp_dir)
|
||||
subprocess.run(["git", "init"])
|
||||
subprocess.run(["git", "init"], cwd=temp_dir)
|
||||
with open(os.devnull, "r") as dev_null:
|
||||
save_stdin = sys.stdin
|
||||
sys.stdin = dev_null
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue