forget about cmd_add test

This commit is contained in:
Paul Gauthier 2023-05-19 09:04:35 -07:00
parent 6dececea84
commit 37812084c1
2 changed files with 1 additions and 31 deletions

View file

@ -180,7 +180,7 @@ class Coder:
), ),
] ]
utils.show_messages(files_messages, "FILES") # utils.show_messages(files_messages, "FILES")
return files_messages return files_messages
def run(self): def run(self):

View file

@ -1,30 +0,0 @@
import os
import tempfile
import unittest
from aider.commands import Commands
from aider.io import InputOutput as IO
from aider.coder import Coder
from unittest.mock import MagicMock # noqa: F401
class TestCommands(unittest.TestCase):
def test_cmd_add(self):
with tempfile.TemporaryDirectory() as tmpdir:
os.chdir(tmpdir)
io = IO(pretty=False, yes=True)
coder = Coder(io)
commands = Commands(io, coder)
with unittest.mock.patch("rich.prompt.Confirm.ask", return_value=True):
commands.cmd_add("foo.txt bar.txt")
foo_path = os.path.join(tmpdir, "foo.txt")
bar_path = os.path.join(tmpdir, "bar.txt")
self.assertTrue(os.path.exists(foo_path), "foo.txt should be created")
self.assertTrue(os.path.exists(bar_path), "bar.txt should be created")
if __name__ == "__main__":
unittest.main()