mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 16:54:59 +00:00
forget about cmd_add test
This commit is contained in:
parent
6dececea84
commit
37812084c1
2 changed files with 1 additions and 31 deletions
|
@ -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):
|
||||||
|
|
|
@ -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()
|
|
Loading…
Add table
Add a link
Reference in a new issue