mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-23 05:45:00 +00:00
test pip install on /help directory
This commit is contained in:
parent
0e067ba8bb
commit
7f38bb49c2
1 changed files with 21 additions and 4 deletions
|
@ -1,13 +1,30 @@
|
||||||
import unittest
|
import unittest
|
||||||
|
from unittest.mock import MagicMock
|
||||||
|
|
||||||
from aider.help import Help, install_help_extra
|
import aider
|
||||||
|
from aider.coders import Coder
|
||||||
|
from aider.commands import Commands
|
||||||
|
from aider.help import Help
|
||||||
from aider.io import InputOutput
|
from aider.io import InputOutput
|
||||||
|
from aider.models import Model
|
||||||
|
|
||||||
|
|
||||||
class TestHelp(unittest.TestCase):
|
class TestHelp(unittest.TestCase):
|
||||||
def setUp(self):
|
@classmethod
|
||||||
io = InputOutput(yes=True)
|
def setUpClass(cls):
|
||||||
install_help_extra(io)
|
io = InputOutput(pretty=False, yes=True)
|
||||||
|
|
||||||
|
GPT35 = Model("gpt-3.5-turbo")
|
||||||
|
|
||||||
|
coder = Coder.create(GPT35, None, io)
|
||||||
|
commands = Commands(io, coder)
|
||||||
|
|
||||||
|
help_coder_run = MagicMock(return_value="")
|
||||||
|
aider.coders.HelpCoder.run = help_coder_run
|
||||||
|
|
||||||
|
commands.cmd_help("hi")
|
||||||
|
|
||||||
|
help_coder_run.assert_called_once()
|
||||||
|
|
||||||
def test_init(self):
|
def test_init(self):
|
||||||
help_inst = Help()
|
help_inst = Help()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue