mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 16:25:00 +00:00
finished adding --yes
This commit is contained in:
parent
4c97d4e654
commit
8a60462167
2 changed files with 13 additions and 13 deletions
|
@ -10,7 +10,7 @@ class TestMain(TestCase):
|
|||
def test_main_with_empty_dir_no_files_on_command(self):
|
||||
with tempfile.TemporaryDirectory() as temp_dir:
|
||||
os.chdir(temp_dir)
|
||||
with open(os.devnull, 'r') as dev_null:
|
||||
with open(os.devnull, "r") as dev_null:
|
||||
save_stdin = sys.stdin
|
||||
sys.stdin = dev_null
|
||||
main()
|
||||
|
@ -19,19 +19,19 @@ class TestMain(TestCase):
|
|||
def test_main_with_empty_dir_new_file(self):
|
||||
with tempfile.TemporaryDirectory() as temp_dir:
|
||||
os.chdir(temp_dir)
|
||||
with open(os.devnull, 'r') as dev_null:
|
||||
with open(os.devnull, "r") as dev_null:
|
||||
save_stdin = sys.stdin
|
||||
sys.stdin = dev_null
|
||||
main(['foo.txt'])
|
||||
main(["foo.txt"])
|
||||
sys.stdin = save_stdin
|
||||
self.assertTrue(os.path.exists('foo.txt'))
|
||||
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"])
|
||||
with open(os.devnull, 'r') as dev_null:
|
||||
with open(os.devnull, "r") as dev_null:
|
||||
save_stdin = sys.stdin
|
||||
sys.stdin = dev_null
|
||||
main(['foo.txt'])
|
||||
main(["--yes", "foo.txt"])
|
||||
sys.stdin = save_stdin
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue