removed yes

This commit is contained in:
Paul Gauthier 2023-05-18 18:12:27 -07:00
parent 59c3fef150
commit ad865fe0f4

View file

@ -6,11 +6,20 @@ from aider.commands import Commands
from aider.io import InputOutput as IO from aider.io import InputOutput as IO
from aider.coder import Coder from aider.coder import Coder
class TestCommands(unittest.TestCase): class TestCommands(unittest.TestCase):
def test_cmd_add(self): def test_cmd_add(self):
with tempfile.TemporaryDirectory() as tmpdir: with tempfile.TemporaryDirectory() as tmpdir:
io = IO(pretty=False, yes=True) io = IO(pretty=False, yes=True)
coder = Coder(main_model="gpt-3.5-turbo", fnames=[], pretty=False, show_diffs=False, auto_commits=False, io=io, dry_run=False, yes=True) coder = Coder(
main_model="gpt-3.5-turbo",
fnames=[],
pretty=False,
show_diffs=False,
auto_commits=False,
io=io,
dry_run=False,
)
commands = Commands(io, coder) commands = Commands(io, coder)
# Mock the Confirm.ask method to return True for creating files # Mock the Confirm.ask method to return True for creating files
@ -23,5 +32,6 @@ class TestCommands(unittest.TestCase):
self.assertTrue(os.path.exists(foo_path), "foo.txt should be created") self.assertTrue(os.path.exists(foo_path), "foo.txt should be created")
self.assertTrue(os.path.exists(bar_path), "bar.txt should be created") self.assertTrue(os.path.exists(bar_path), "bar.txt should be created")
if __name__ == "__main__": if __name__ == "__main__":
unittest.main() unittest.main()