MCPcopy
hub / github.com/Aider-AI/aider / test_cmd_add

Method test_cmd_add

tests/basic/test_commands.py:35–48  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

33 shutil.rmtree(self.tempdir, ignore_errors=True)
34
35 def test_cmd_add(self):
36 # Initialize the Commands and InputOutput objects
37 io = InputOutput(pretty=False, fancy_input=False, yes=True)
38 from aider.coders import Coder
39
40 coder = Coder.create(self.GPT35, None, io)
41 commands = Commands(io, coder)
42
43 # Call the cmd_add method with 'foo.txt' and 'bar.txt' as a single string
44 commands.cmd_add("foo.txt bar.txt")
45
46 # Check if both files have been created in the temporary directory
47 self.assertTrue(os.path.exists("foo.txt"))
48 self.assertTrue(os.path.exists("bar.txt"))
49
50 def test_cmd_copy(self):
51 # Initialize InputOutput and Coder instances

Callers

nothing calls this directly

Calls 4

cmd_addMethod · 0.95
InputOutputClass · 0.90
CommandsClass · 0.90
createMethod · 0.80

Tested by

no test coverage detected