mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 08:14:59 +00:00
aider: Fixed InputOutput instantiation in test_cmd_add.
# Context: USER: I ran this command: pytest tests/test_commands.py Which produced this output: ============================= test session starts ============================== platform darwin -- Python 3.11.3, pytest-7.3.1, pluggy-1.0.0 rootdir: /Users/gauthier/Projects/aider collected 1 item tests/test_commands.py F [100%] =================================== FAILURES =================================== __________________________ TestCommands.test_cmd_add ___________________________ self = <tests.test_commands.TestCommands testMethod=test_cmd_add> def test_cmd_add(self): with tempfile.TemporaryDirectory() as tmpdir: original_cwd = os.getcwd() os.chdir(tmpdir) > io = InputOutput() E TypeError: InputOutput.__init__() missing 2 required positional arguments: 'pretty' and 'yes' /Users/gauthier/Projects/aider/tests/test_commands.py:14: TypeError =========================== short test summary info ============================ FAILED tests/test_commands.py::TestCommands::test_cmd_add - TypeError: InputO... ============================== 1 failed in 0.77s =============================== ASSISTANT: I apologize for the oversight. The `InputOutput` class requires two positional arguments: `pretty` and `yes`. Let's update the test to provide these arguments. Here's the code change: ```python tests/test_commands.py <<<<<<< ORIGINAL io = InputOutput() ======= io = InputOutput(pretty=True, yes=True) >>>>>>> UPDATED ``` This should fix the `TypeError` and allow the test to run successfully.
This commit is contained in:
parent
922d28216a
commit
3998bf4c2e
1 changed files with 1 additions and 1 deletions
|
@ -11,7 +11,7 @@ class TestCommands(TestCase):
|
|||
original_cwd = os.getcwd()
|
||||
os.chdir(tmpdir)
|
||||
|
||||
io = InputOutput()
|
||||
io = InputOutput(pretty=True, yes=True)
|
||||
coder = Coder(io)
|
||||
commands = Commands(io, coder)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue