From 3b0c5132f21ad041b6a81814de7fdc80b73a42da Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Thu, 11 May 2023 17:52:34 -0700 Subject: [PATCH] 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 ``` --- tests/test_main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_main.py b/tests/test_main.py index 15b83670f..fb5eeb8f5 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -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