From 37812084c1b817ed6febb770656c722d5a7e7119 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 19 May 2023 09:04:35 -0700 Subject: [PATCH] forget about cmd_add test --- aider/coder.py | 2 +- tests/test_commands.py | 30 ------------------------------ 2 files changed, 1 insertion(+), 31 deletions(-) delete mode 100644 tests/test_commands.py diff --git a/aider/coder.py b/aider/coder.py index 924e03000..76f26a700 100755 --- a/aider/coder.py +++ b/aider/coder.py @@ -180,7 +180,7 @@ class Coder: ), ] - utils.show_messages(files_messages, "FILES") + # utils.show_messages(files_messages, "FILES") return files_messages def run(self): diff --git a/tests/test_commands.py b/tests/test_commands.py deleted file mode 100644 index 02d99bdac..000000000 --- a/tests/test_commands.py +++ /dev/null @@ -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()